()

Transparent Application Fail-over in Oracle RAC


Transparent Application Failover (TAF) is used for the failover process, if the database instance connection goes fails it would reconnect to the next available database instance. TAF can be configured in 2 ways.

1. Server-Side
2. Client-Side.


In this blog, we will configure server-side TAF. To configure TAF policy use SRVCTL as in the following below example:


srvctl service configuration syntax.

srvctl add service -d <db_unique_name> -s <service_name>

-r “” [-a “”] [-P {BASIC | NONE | PRECONNECT}]
-g [-c {UNIFORM | SINGLETON}]
[-k <net_num>]
[-l [PRIMARY][,PHYSICAL_STANDBY][,LOGICAL_STANDBY][,SNAPSHOT_STANDBY]]
[-y {AUTOMATIC | MANUAL}]
[-q {TRUE|FALSE}]
[-x {TRUE|FALSE}]
[-j {SHORT|LONG}]
[-B {NONE|SERVICE_TIME|THROUGHPUT}]
[-e {NONE|SESSION|SELECT}]
[-m {NONE|BASIC}]
[-z <Failover_retries> ]
[-w <Failover_delay>]


Below are the description options for the above srvctl syntax.


-r “” [-a “”] [-P {BASIC | NONE | PRECONNECT}]
This clause is valid only for Administrator-managed database which support PRECONNECT method.

-g [-c {UNIFORM | SINGLETON}]
This clause is valid only for Policy-managed databases wherein PRECONNECT method is not available.s


The above two options instruct Clusterware on how to handle this service.

[-e {NONE|SESSION|SELECT}]
This defines the type of TAF whether SESSION or SELECT.

[-m {NONE|BASIC}]
This defines the method of TAF.

[-z ]
This defines the the number of times to attempt to connect after a failover.

[-w ]
This defines the amount of time in seconds to wait between connect attempts.



Steps to configure server-side configuration.

1.Check Database status

oracle@DBGURU ~]$ srvctl status database -d DBGURU
Instance DBGURU1 is running on node DBGURU
Instance DBGURU2 is running on node DBGURU


2. Add service

[oracle@DBGURU ~]$ srvctl add service -d DBGURU -s DBGURU_test -r DBGURU1,DBGURU2 -P basic -e select -m basic -z 10 -w 5


3. service status

[oracle@DBGURU ~]$ srvctl status service -d DBGURU
Service DBGURU_test is not running.


4. Start Service

[oracle@DBGURU ~]$ srvctl start service -d DBGURU -s DBGURU_test

5.Service status

[oracle@DBGURU ~]$ srvctl status service -d DBGURU
Service DBGURU_test is running on instance(s) DBGURU1,DBGURU2


Add service into TNS entry on both node.

DBGURU_test=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = DBGURU-scan)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DBGURU_test)
)
)

Below query to show failover status.

select inst_id,username,service_name,failover_type,failover_method,failed_over from gv$session where username='DBGURU'


This document is only for learning purposes and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the latest update. Click here to know more about our pursuit.

 

Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

DBsGuru

Hello and welcome to DBsGuru,DBsGuru is a group of experienced DBA professionals and serves databases and their related community by providing technical blogs, projects, training. Technical blogs are the source of vast information not about databases but its related product like middleware, PL/SQL, replication methodology, and so on.Thanks for the visits!Share Learn Grow!

3 thoughts on “Transparent Application Fail-over in Oracle RAC

  1. This information is very useful 🙂. Nicely explain about TAF. Thanks for sharing Informative information.

Comments are closed.