GTSubset not able to connect with Azure SQL database
search cancel

GTSubset not able to connect with Azure SQL database

book

Article ID: 380118

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

GT Subset is not able to connect to contained Azure SQL database. Able to connect to this DB from TDM Portal and Datamaker.

From GT Subset getting below error. 

adding profile:testdbconn
adding profile:tdm_sep_datamakerconnection
adding profile:tdmadmin - tdm
adding profile:tdw_tdm_raw
connection string: jdbc:sqlserver://hostname:1433;DatabaseName=TDW_TDM;integratedSecurity=false;trustServerCertificate=true
Loading Driver:com.microsoft.sqlserver.jdbc.SQLServerDriver
[ERROR] 2024-09-11 10:28:24.472 [AWT-EventQueue-0] DBUtils - failed to get connection for Driver: 'com.microsoft.sqlserver.jdbc.SQLServerDriver', User: TestingUser, URL: jdbc:sqlserver://hostname:1433;DatabaseName=master;integratedSecurity=false;trustServerCertificate=true, with exception: Login failed for user 'TestingUser'. ClientConnectionId:24fd35c8-0c86-4f60-8315-d39dc4a4ee32
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'TestingUser'. ClientConnectionId:24fd35c8-0c86-4f60-8315-d39dc4a4ee32
        at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
        at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:305)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:138)
        at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:42)

Environment

TDM 4.11

Cause

This issue is caused because the DB user doesn't has read permissions to the master database. GT SUBSET component needs access to the master database to "read" some information. 

Resolution

In the fixed patch build, disabled the use of master database by adding a text file named connectionConfiguration.txt in the directory (C:\Users\WindowsUsername\AppData\Roaming\Grid-Tools),

The fixed patch can be downloaded from 
https://ftp.broadcom.com/user/downloads/pub/TDM/Subset/SubSet-4.11.29.0.zip

Steps:

- remove the lib folder from Program Files (x86)\Grid-Tools\GTDatamaker
- unzip and copy content to Program Files (x86)\Grid-Tools\GTDatamaker

- In text file named connectionConfiguration.txt in the directory (C:\Users\WindowsUsername\AppData\Roaming\Grid-Tools), add the line: 
useMaster=false