This post explains the option of srvctl to failover the service when we stop the instance. Normally Clusterware doesn’t failover any of the resources during a planned shutdown. The failover will work during unplanned outages and any srvctl shutdown is basically a planned shutdown from a Clusterware point of view.
The -f option of srvctl would failover the running services to another instance, before shutting down the instance.
Usage: srvctl stop instance -d [db_unique_name] {-n [node_name] | -i [inst_name_list]} [-o [stop_options]] [-f] -d [db_unique_name] Unique name for the database -n [node_name] Node name -i "[inst,...]" Comma separated instance names -o [stop_options] Options to shutdown command (e.g. NORMAL,TRANSACTIONAL, IMMEDIATE, or ABORT) -f This option fails the running services over to another instance. <<<< -h Print usage
For Example:
$ srvctl status database -d v11202 Instance v11202_2 is running on node lnxrac1 Instance v11202_1 is running on node lnxrac2
$ srvctl status service -d v11202 Service v11202_svc is running on nodes: lnxrac2
$ srvctl stop instance -d v11202 -i v11202_1 -f
After shutdown:
$ srvctl status database -d v11202 Instance v11202_2 is running on node lnxrac1 Instance v11202_1 is not running on node lnxrac2
$ srvctl status service -d v11202 Service v11202_svc is running on nodes: lnxrac1