Subscribe to Posts by Email

Subscriber Count

    701

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Managing Grid Infrastructure 12c : Creating and Testing TAF Services

Hello,

In this post we will create TAF (Transparent Application Failover) Services as such pre-11gr2 method that is available and preferred instances way.

Environment:-

1. 4 Node RAC, rac01,rac02,rac03,rac04 running orcl database and its instances.

2. A service server_taf is created, for which orcl1 is available instance and orcl2 is the preferred instance.

TAF Setup & Testing:-

1. Create Service

srvctl add service -d orcl -s server_taf –r orcl1 –a orcl2 -P BASIC

2. Start the service

srvctl start service -d rac -s server_taf

3. Check the services

srvctl config service -d rac

3. Modify the service to have load balancing options (optional)

SQL> execute dbms_service.modify_service (service_name => 'server_taf' -
, aq_ha_notifications => true -
, failover_method => dbms_service.failover_method_basic -
, failover_type => dbms_service.failover_type_select -
, failover_retries => 180 -
, failover_delay => 5 -
, clb_goal => dbms_service.clb_goal_long);

 

4. Keep tns entries in both client and server side (on all nodes too)

SERVERTAF =
(DESCRIPTION =
(LOAD_BALANCE = yes)

(ADDRESS = (PROTOCOL = TCP)(HOST = scan.localdomain)(PORT = 1521))

(CONNECT_DATA =(SERVICE_NAME = server_taf.localdomain)

(FAILOVER_MODE= (TYPE=select)(METHOD=method)

)

5. Check the configuration

All the screenshot has been sent by Deepak kumar from his test server, Much thanks to him for his time and effort and permitted us to upload for all benefit1

 

6. Check the Service run state, server_taf is running on orcl1

2. Service is running in NODE01 or orcl1 currently ( Initially)

7. Test the TAF Service

sqlplus system/manager@server_taf

check in the node with following query where is the session and failover mode status

SELECT MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER, COUNT(*)
FROM V$SESSION
GROUP BY MACHINE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER;

 

8. Run a very big query in the session you have connected

SQL> Select * from dba_objects;

This will run approx 5-10 mins in my test machine

9. Kill the pmon at OS level to simulate crash on Node 1 and apparently service should failover to the available node, and also the workload i.e the above dba_objects query rather the session disconnection and disruption

 

4. On NODE01 we had kill at OS Level and checking status at DB Level or SRVCTL

On node 2, check the v$session with following query, observe the failed_over column shows that rac01 session has been failoved over to orcl2 and marked yes.3. Service was killed m NOD01 and not running in NODE02 or orcl2 currently ( relocated)

And you may also observe the session in orcl1 (node1) is still running as such.

10. Start the instance orcl1 on node 1 and relocate the services back to orcl1 from orcl24b . RELOCATE it back to orcl1 once the pmon or DB is up in RAC01 from RAC02

11. Check the configuration

5. Configuaration setting

In Next post we will see to create a server pools and then add this service to serverpool. Basically in this method, the services are bounded to instances , available node and preferred node, but in serverpools concept the services bound to nodes anywhere.

-Thanks

Comments are closed.