High Availbility

OS & Virtualization

Thursday, August 15, 2013

How to relocate Oracle RAC Service

Starting/Stopping Database instance

The database (all instances) can be shut down / started by running the below command from a command prompt window of the database servers.




 srvctl stop database –d opera –o immediate

srvctl start database –d opera

srvctl start database –d opera –o mount
srvctl stop instance –d opera –i opera3 –o immediate
or
srvctl stop instance –d opera –i "opera1,opera2 –o immediate 
 





Starting/Stopping Services






 srvctl start service –s "volors,oxihub" –d opera



How to set auto start resources in 11G RAC

https://oracleracdba1.wordpress.com/2013/01/29/how-to-set-auto-start-resources-in-11g-rac/ 
 

How to relocate Oracle RAC Service

All cluster services related to node 1 will be in OFFLINE state.

Take note on the slhors service. This service will failover to node 3 when either node 1 or 2 is down.

When we check using the srvctl command, you will this:





 d:\oracle\1020\crs\bin> srvctl status service -d opera -s slhorsservice slhors is running on instance opera2,opera3



It is now handled by opera2 and opera3 instances because node1 is down.

However, even after node 1 is up, instance opera3 won’t move the service back to opera1, therefore, we have to manually relocate the slhors service handled by opera3 back to opera using the following statement:






 
d:\oracle\1020\crs\bin> srvctl relocate service -d opera -s slhors -i opera3 -t opera1





Note that the slhors is now handled by opera1, opera2 again as it should be.