I would like to configure the DB connect to do fail over logic for Oracle database. I was given the below two options to handle that. Is there a way to configure this? If not what could be the best option for me to query the active database.
JDBC string that handles the db failover logic:
jdbc:oracle:thin:@(description=(address_list=(load_balance=on)(failover=on)(address=(protocol=tcp)(host=1.2.3.4)(port=9999))(address=(protocol=tcp)(host=5.6.7.8)(port=9999)))(connect_data=(service_name=MYDB)(failover_mode=(type=select)(method=basic))))
.
.
TNS entry:
MYDB.dummy =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 9999))
(ADDRESS = (PROTOCOL = TCP)(HOST = 5.6.7.8)(PORT = 9999))
)
(CONNECT_DATA =
(SERVICE_NAME = MYDB))
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 5.6.7.8)(PORT = 9999))
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.2.3.4)(PORT = 9999))
)
(CONNECT_DATA =
(SERVICE_NAME = MYDB))
)
)
We connected Splunk to the virtual instance, this way it queries the active node.