Oracle RAC and TAF Gotchas

One of the most exciting features available from Oracle's Real Application Clusters (RAC) is 24/7 availability. When a node fails, Transparent Application Failover (TAF), allows transactions to restart or be resumed on another node in the cluster, in theory providing no interruption of service to the client.

As a developer, there is nothing transparent about TAF. I recently had a client move to an Oracle RAC environment for their existing application. They assumed that RAC would take care of everything and there would be minimal or no code changes.

If you are moving an application to RAC, here are some things to keep in mind:

  • If you are using Java, you must use the JDBC Type II "thick" driver and not the thin driver. TAF is only available through the Oracle Call Interface (OCI).
  • PL/SQL package state is lost after failover.
  • ALTER SESSION statements are lost.
  • Continuing work on existing cursors may raise an error (e.g.: ORA-25401 "cannot continue fetches")
  • Failed over selects may take time to re-position (when FAILOVER_TYPE=SELECT) and may raise an error.

Bottom line is nothing is free. If you want TAF, you have to code your application for it.

If you have access to Metalink, a detailed description of TAF's limitations can be found in document 97926.1