Sunday, January 21, 2018

Service Failover 11g/12c Oracle RAC

In this post we'll try to distinguish the rules of service failover to another instance.

If using sqlplus to shutdown instance
  • In pre-11.2.0.4 (11.2.0.2), the service  will failover to available instance
  • In 11.2.0.4 or above (12.1.*), the service will not failover but stop because SQLPLUS abort is detected by the database agent as PLANNED_OFFLINE with label "Instance Shutdown, Stable", thus clusterware does not failover the services. For a real crash, it would be OFFLINE with "Abnormal Termination".
If shutdown instance using srvctl
  • In pre-11.2, the service will failover to available instance.
  • In 11.2, the service will not failover but stop
  • In 11.2, you need to use "-f " option if you want service failover to available instance when stopping instance using srvctl.
  • You may relocate service to another instance before stopping instance through srvctl. e.g."srvctl relocate service -d racdb -s temp_serv -i racdb1 -t racdb2"
  • In 12c, you need to use "-failover" option to failover service to available instance.
New Changes in 12c
1) If stopping instance without -force or -failover option while you have service running on the stoping instance, errors (PRCD-1315,PRCR-1014, PRCR-1065, CRS-2529) are reported
[oracle@rac121 ~]$ srvctl stop instance -d racdb -i racdb1
PRCD-1315 : failed to stop instances for database racdb
PRCR-1014 : Failed to stop resource ora.racdb.db
PRCR-1065 : Failed to stop resource ora.racdb.db
CRS-2529: Unable to act on 'ora.racdb.db' because that would require stopping or relocating 'ora.racdb.temp_serv.svc', but the force option was not specified

2) If you want to stop both instance AND services running on the instance, use '-force' option.

[oracle@rac121 ~]$ srvctl stop instance -d racdb -i racdb1 -force 

3) If you want to stop instance but failover the services to another instance, you need to use '-failover' option instead '-force'. Click Here to get more details on this.

No comments:

Post a Comment