Question

I have a customer that have a RAC environment (2 nodes, database version is 11gR2).

Clusterware version:

[grid@server2 ~]$ crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [11.2.0.4.0]
[grid@server2 ~]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.4.0]

Their aplication not use correctly the TAF (transparent application failover)

After some research I've tested using swingbanch and I've found the same behavior in my LAB environment:

INST_ID USERNAME   SERVER    SERVICE_NAME         PROGRAM              STATUS   FAILOVER_TYPE FAILOVER_M FAI
---------- ---------- --------- -------------------- -------------------- -------- ------------- ---------- ---
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         1 SOE        DEDICATED mootdb_prod          sqlplus.exe          INACTIVE SELECT        BASIC      NO
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         1 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO
         2 SOE        DEDICATED mootdb_prod          JDBC Thin Client     ACTIVE   NONE          NONE       NO

The only session using the TAF above is a session created manually from sqlplus (failover_type column). I'm using the same tnsnames alias in all sessions.

Why is this happening. Is there some requirement in the application side as well for it work correctly?

Was it helpful?

Solution

The output shows that your sessions use the "Thin" driver (JDBC Thin Client), which is incapable of using TAF.

Transparent Application Failover

Transparent Application Failover (TAF) is a feature of the Java Database Connectivity (JDBC) Oracle Call Interface (OCI) driver.

Sometimes the JDBC OCI driver is also called as the "Thick" driver.

Here is a blog series about this topic:

https://blog.yannickjaquier.com/oracle/jdbc-client-high-availability-features-part-1.html

Part 2 is about TAF:

https://blog.yannickjaquier.com/oracle/jdbc-failover-highly-available-part-2.html

Make sure you configure swingbench to use oci driver type. It has the -dt oci commandline option for that. Also make sure you use a proper connection string with the failover options and addresses.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top