How Stop / Start Multiple Database Instances Under One Oracle Home in Single srvctl Command?

There are different situations (e.g: patching) to shutdown or startup multiple databases instance under one ORACLE HOME under one RAC node. 

 Syntax: 

 You will have to bring down all the instance at a time under one ORACLE_HOME. You cannot select instances under the oracle home.

 
srvctl stop home -o <DB HOME> -s <state filename with absolute path> -t <db shutdown option> -n NODE

While bringing up the instance you can select the instances to be brought up by editing the state file.

srvctl start home -o <DB HOME> -s <state filename with absolute path> -n NODE

Example: Command to Shutdown all instances under oracle home

srvctl stop home -o /data_acc/app/oracle/product/12.1.0/db_1 -s /home/oracle/node2_inst -t immediate -n racnode1

Sample entries of state file which mentioned in the -s option of the command. This file will get created during the stop command.

$ cat node2_inst
db-emdb
db-mmdb
db-onldb
advertisements
 
If the state file already present in the location mentioned in the -s option, it will throw below error.

PRKO-3244 : The '-statfile <state_file>' option value "/home/oracle/node2_inst" already exists

Command to startup all instances under oracle home

srvctl stop home -o /data_acc/app/oracle/product/12.1.0/db_1 -s /home/oracle/node2_inst -t immediate -n racnode1

No comments:

Post a Comment