• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Failover a Service During Instance Shutdown Using SRVCTL

by admin

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

Filed Under: oracle, RAC

Some more articles you might also be interested in …

  1. ORA-30012 Database Does Not Start With UNDO_MANAGEMENT=AUTO – Oracle Database 11gr2
  2. How to convert Linux dd .img to .VDI, VMDK, VHD with VIrtualBox Command
  3. What is OCFS or OCFS2
  4. Truncate Table Statement: REUSE STORAGE VS DROP STORAGE
  5. Oracle SQLT (SQLTXPLAIN) Interview Questions
  6. RMAN: SET NEWNAME Command Using SQL
  7. Types of Workload Distribution (Load Balancing) in Oracle RAC
  8. How to Find OCR Master Node
  9. How to use Privilege Analysis in Oracle Database
  10. How To Shrink A Temporary Tablespace in Oracle Database

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright