Transparent Application Failover
From Oracle FAQ
Transparent Application Failover or TAF is a SQL*Net configuration that allows session fail-over between different nodes of a RAC database cluster.
Limitations[edit]
TAF only works for idle sessions and SELECT statements. The following operations will give an error (user program must restart the operation after fail-over):
- PL/SQL program units - stored procedures, functions, packages
- DML - INSERT, UPDATE, DELETE, SELECT ... FOR UPDATE
- DDL - CREATE, ALTER, DROP, TRUNCATE, GRANT, REVOKE, etc.
If your program executes one of the above operations, you will receives an ORA-25408 error. It is then up to the application to check if the failed statement can be re-issued.
Configuration[edit]
Sample tnsnames.ora entries to configure TAF:
sales =
(DESCRIPTION =
(ENABLE=BROKEN)
(LOAD_BALANCE=yes)
(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales)
(FAILOVER_MODE =
(TYPE=session)
(METHOD=basic)
(RETRIES=10)
(DELAY=10)
)
)
)
Non-TAF entries to connect directly to specific instances:
node1_sales =
(DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))
(CONNECT_DATA =
(SERVICE_NAME=sales)
(INSTANCE_NAME=sales1)
)
)
node2_sales =
(DESCRIPTION =
(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))
(CONNECT_DATA =
(SERVICE_NAME=sales)
(INSTANCE_NAME=sales2)
)
)
