Java connection string to support TAFA function

We are currently using Spring JDBC with a connection pool implementation from DBCP to connect to a supported TAF ORACLE 11g2 server.

Connection string used

jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(LOAD_BALANCE=ON)(FAILOVER=ON)(ADDRESS = (PROTOCOL = TCP)(HOST = **IP1**)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = IP2)(PORT = 1521)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = **service_name**)(FAILOVER_MODE=(TYPE=select)(METHOD=basic)))) 

When v $ session is requested, the failure method is used to check the type of failover. It shows up like no one. enter image description here

What needs to be done to set failover_type and failover_method to SELECT and BASIC respectively. enter image description here

Are there any invalid settings in the connection string, please suggest. Thanks in advance.

0
source share
1 answer

Documentation 11.2 oracle jdbc says: "Transparent Application Failover (TAF) is a function of the Oracle Call Interface (JIBC) Oracle Database Interface (OCI) driver", your connection string is: JDBC: oracle: thin: Therefore, to enable TAF, you must use the OCI jdbc driver, not the thin one. I have never used the OCI jdbc driver, but I assume you should install the standard oracle native client or instant client.

+2
source

All Articles