Monday, January 22, 2018

How to failover a service during instance shutdown Oracle RAC12c

We can use srvctl to failover the running services to another instance, before shutting down the instance. In this demonstration we'll use "-failover" option to move services to another node before shutting down the node.

Step1 : Check the status of database
[oracle@rac121 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node rac121
Instance racdb2 is running on node rac122

Step2 : Check status of service
[oracle@rac121 ~]$ srvctl status service -d racdb
Service temp_serv is running on instance(s) racdb1

Step 3: Stop the instance but use "-failover" option
[oracle@rac121 ~]$ srvctl stop instance -d racdb -i racdb1 -failover

Step 4: Check status of service, now my service is running on another node
[oracle@rac121 ~]$ srvctl status service -d racdb
Service temp_serv is running on instance(s) racdb2

Step 5: Check database status
[oracle@rac121 ~]$  srvctl status database -d racdb
Instance racdb1 is not running on node rac121
Instance racdb2 is running on node rac122

So without "-failover" option, you will not be able to stop instance if any service is running on that instance. In next post we'll see more details on service failover.

No comments:

Post a Comment