http://kotioracledba.blogspot.in/2012/06/startup-and-shutdown-rac-databases.html?m=1
Startup and shutdown RAC databases
Procedure to stop RAC database
1. Shut down any processes in the Oracle home on each node that might be accessing a database. For example if agent is installed and configured to monitor the database, then you need to stop agent using below command.
$ $AGENT_HOME/bin/emctl stop agent
Before you stop agent, don’t forget to set blackout on targets depending on the requirements. For example if it is a database level outage, then set blackout on the database and its listeners or set blackout with nodeLevel option for server level outage otherwise your alert mailbox will get bombard with false alerts.
2. Shut down all Oracle RAC instances on all nodes using below commad.
$ $ORACLE_HOME/bin/srvctl stop database –d db_name
This command stops all instances and services associated with a database. Remember listeners are not stopped because they might be serving other database instances running on the same machines.
$ $ORACLE_HOME/bin/srvctl stop asm –n node
This step has to be repeated once for each node.
4. Stop all node applications on all nodes.
$ $ORACLE_HOME/bin/srvctl stop nodeapps –n node
This step has to be repeated once for each node. This command causes to stop nodeapps (VIP,GSD,Listener and ONSdaemon) processes.
5. Shut down the Oracle Clusterware or CRS process.
# $CRS_HOME/bin/crsctl stop crs
This command has to be repeated once for each node and this should be executed as root user only.
Usually, CRS and the databases will be started automatically when server gets started (By default CRS is in enabled state). However, there are some cases where we will have to disable the CRS before server shutdown. For example, server needs to be rebooted multiple times to apply OS patches, in that cases we will have to disable to CRS to ensure file systems do not get corrupted. When you disable the CRS, CRS and database will not start automatically and we will have to start CRS and databases manually.
Follow below steps to bring up cluster and the databases.
1.Start the Oracle Clusterware or CRS process.
# $CRS_HOME/bin/crsctl start crs
This command has to be repeated once for each node and this should be executed as root user only.
2. Start all node applications on all nodes.
$ $ORACLE_HOME/bin/srvctl start nodeapps –n node
This step has to be repeated once for each node. This command causes to start nodeapps (VIP,GSD,Listener and ONS daemon) processes.
3.Start all ASM instances on all nodes (If ASM configured)
$ $ORACLE_HOME/bin/srvctl start asm –n node
This step has to be repeated once for each node.
4.Start all Oracle RAC instances on all nodes using below commad.
$ $ORACLE_HOME/bin/srvctl start database –d db_name
This command starts all instances and services associated with a database.
5.Start oracle agent (if any) and stop blackout in case if you had set before you bring the database down.
$ $AGENT_HOME/bin/emctl start agent
No comments:
Post a Comment