Transparent Application Fail-over in Oracle RAC

3 Comments

4.5
(22)

Transparent Application Failover (TAF) is used for failover process, if the database instance connection goes fails it would reconnect to available database instance.

TAF can be configure in a 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 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 database where in PRECONNECT method is not available.



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 purpose 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.

 1,351 Total Views,  2 Views Today

How useful was this post?

Click on a star to rate it!

Average rating 4.5 / 5. Vote count: 22

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?

Spread the love

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

Leave a Reply

Your email address will not be published. Required fields are marked *

one × 4 =

Follow us on Social Media
Open chat
1
Contact Us:
Hi,

Greetings of the day! How can we help you?

Thanks.
Team DBsGuru
Direct Call:+91-9310167776
Email: info@dbsguru.com