TDM repository GTREP connection using the TNS alias
search cancel

TDM repository GTREP connection using the TNS alias

book

Article ID: 368631

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Looking for steps for changing the connection to GTREP using the TNS alias connection instead of HOST connection.


Currently in the application.properties we have the connection set as

# spring.datasource.url=jdbc:oracle:thin:@//xxxconn01xxx:1521/gtrep_02.ittest.corner.local

spring.datasource.url=jdbc:oracle:thin:@//xxxconn02xxx:1521/gtrep_02.ittest.corner.local

Is it possible to use the connection to the TNS alias defined in the tnsname.ora?


gtrep.ittest.corner.local =

(DESCRIPTION =

(ADDRESS_LIST =

(FAILOVER=ON)

(LOAD_BALANCE=OFF)

(ADDRESS = (PROTOCOL = TCP)(HOST =xxxconn01xxx)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST =xxxconn02xxx)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = gtrep_02.ittest.corner.local)

)

)

How to set it in the application.properties file?

Using the host connection it’s a problem as if DBA switch from an address to the other, need to change the file and if there is no notification from DBA, could cause lot of connection issues losing time to understand the problem.

Environment

TDM Portal 4.11.x

Resolution

Requested behavior is to switch between the provided list of servers in tns file is like a failover mechanism based on the static information. Such option is not available in current implementation of TDM Portal.

However, based on the concept, could be tried by adding Java property oracle.net.tns_admin in the wrapper.conf(located at C:\Program Files\CA\CA Test Data Manager Portal\service\conf) and setting it to location of that file and then using jdbc:oracle:thin:@ENTRY_FROM_TNSNAMES as connection string.
Note that this solution has not been tried or tested and even if it connects successfully to one of the DB servers, it doesn't mean that failover will work - this is implemented in Oracle JDBC driver and we not known if support for failover has been implemented. All that Portal can do is point Oracle driver to correct file and alias but everything else is up to the driver.