Configure Transparant Application Failover(TAF) in Oracle RAC Environment

Configure Transparant Application Failover(TAF) in Oracle RAC Environment

Transparent Application Failover
TAF provides automatic transfer to the other instance when the first server failed.
It enables you to automatically reconnect to a database through another available instance if connected instance goes down.

Steps to configure TAF in RAC Environment at Server Side

1. Check all the services and find its configured for Failover or not.

select name, failover_method, failover_type, failover_retries,goal, clb_goal,aq_ha_notifications
from dba_services ;

2. IF no service configured, then Create a Service on RAC environment
Create new service with name FAILSERVICE to databse ORCL and instances rac1,rac2.

srvctl add service -d orcl -s FAILSERVICE -r "rac1,rac2" -P BASIC

3. Start and check the Service is running

-- Start the service
srvctl start service -d orcl -s FAILSERVICE


--Check the service
srvctl config service -d orcl

4. Modify the service parameters, failover run for SELECT Statement with BASIC method

srvctl modify service -d ORCL -s FAILSERVICE -m BASIC -e SELECT -q TRUE -j LONG

5. Check from dba services

select name, failover_method, failover_type, failover_retries,goal, clb_goal,aq_ha_notifications
from dba_services where name = 'FAILSERVICE';

NAME        FAILOVER_METHOD FAILOVER_TYPE  FAILOVER_RETRIES GOAL CLB_GOAL AQNOT
----------- --------------- ------------- ----------------- ---- -------- -----
failservice BASIC           SELECT          180             NONE LONG     YES

6. Create an entry in TNS

failservice =
(DESCRIPTION =
(LOAD_BALANCE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = RAC1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = RAC2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = failservice)
)
)

7. Verfied the Service name in listener services

lsrnctl services


Service "failservice" has 2 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
REMOTE SERVER
(ADDRESS=(PROTOCOL=TCP)(HOST=RAC11)(PORT=1521))
"DEDICATED" established:0 refused:0 state:ready

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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