Transparent Application Failover – TAF

Transparent Application Failover (TAF) is a client-side feature that allows for clients to reconnect to surviving databases in the event of a failure of a database instance.

Note that this is not used for purpose of load balancing or for Connect Time Failover.


TAF operates in two modes

 – Session Failover which will recreate lost connections and sessions

– Select Failover which will replay queries that were in progress. It will discard the old rows which have been fetched earlier and will fetch the rest of rows.

 TAF can be implemented at

 – Client Side

Server Side

 Client Side

 This can be done by creating a entry in tnsnames.ora as follows


 (FAILOVER=on) </strong>
(ADDRESS= (PROTOCOL=tcp) HOST=prod01-vip)(PORT=1521))
(ADDRESS= (PROTOCOL=tcp)(HOST= prod02-vip)PORT=1521))
<strong>(FAILOVER_MODE= (TYPE=select)

Here FAILOVER_MODE parameter is used to implement TAF.

Above configuration is for connections which will allow new connections to be created at failover time. This is determined by parameter METHOD which is set to BASIC here.

You can also have a session established before. This helps as new connection can take time and will thus result in faster failover. To do this use

(ADDRESS= (PROTOCOL=tcp) HOST=prod01-vip)(PORT=1521))
(TYPE=select) (METHOD=PRECONNECT)</strong>)))

 (ADDRESS= (PROTOCOL=tcp) HOST=prod01-vip)(PORT=1521))
 <strong>(BACKUP= TESTDB_prod01)

Following query can be used to monitor information about failed over sessions


Server Side Configuration


This can be done using server-side service attributes. Please note that in case both (Client side and server side) configuration are used then service-side settings will be used.


You can refer to following note for details


Note 404644.1 – Configuration of Transparent Application Failover(TAF) works with server side service

Features of TAF

 – Sessions executing any insert/update/delete statement fail then statement will be rollback.

A command which has been successfully completed upon failure and has changed the database state, then TAF does not resend the command.

When using select failover, we will retrieve only the rows which have not been fetched by earlier sessions.

Tags: , ,

5 thoughts on “Transparent Application Failover – TAF”

  • Hi

    Some of my application are coded in Pro*c .We are using Oracle 10g.i would liek know how tomake the application grid aware. Ie how to switch over to another instance running aon another node provided orginal one fails in execution.

  • Rommel,

    I have never done Pro*c coding so not aware about how to do it. I did a search on metalink and found Note 415245.1 with a sample code to implement the same. You can refer to the before mentioned note.


    • Actually above mentioned note is available on metalink and is published and can be viewed by all metalink users. I can’t provide the link as you need to have metalink account to view this article.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.