Stop the RAC database
Step 1: Check the RAC database status
srvctl status database -d DATBASE_UNIQUE_NAME
ps -ef |grep -i smon
Each node has one database instance and one ASM instance.Therefore, the ps –ef |grep –i smon would see 2 smon processes. One for ASM and another one for database.
Step 2: Shutdown database instance via srvctl
srvctl stop databsae -d DATABASE_UNIQUE_NAME
ps -ef |grep -i smon
srvctl status databsae -d DATABASE_UNIQUE_NAME
crsctl status resource RESOURCE_NAME -t
The srvctl stop database would shutdown the database instance on both nodes.
Step3: shutdown the clusterware
To shutdown the clusterware, we can not just use oracle or grid account. It would give us the “CRS-4563: Insufficient user privileges” error.
su to root , Source the environment for grid and Check the cluster resource status
crsctl status resource -t
crsctl stop cluster
From screenshot below, we can see once we shutdown the cluster resource from RAC1 node, the clusterware would failover to the other node.
To verify the clusterware is complete shutdown on the node1 (RAC1), we can use crsctl status resource to check. We would get the “CRS-4535: Cannot communicate with Cluster Ready Services”
Therefore, in order to complete shutdown the clusterware on all node, we have to run the crsctl stop cluster on all nodes.
On the node2, if we run check the cluster resource ( crsctl status resource –t), we would see the resource is in the failover state.
Start the RAC database
Step1: Check clusterware is not running
crsctl status resource -t
Step2: Use root to start the clusterware
root user needs to source the grid environment. This needs to be perform on all RAC nodes.
crsctl start cluster
Step3: Check the cluster resource and ASM instance
crsctl status resource -t
ps -ef |grep -i smon
Step4: Start the Oracle database instance
This would start the database instance on all the RAC nodes.
srvctl start database -d RAC1
There is no output from above command, just use the crsctl status resource to check the database resource. We can also check the smon processes.
We should see 2 smon processes on the host.
Step5: Start the OEM
OEM is not part of cluster resource. If you have shutdown earlier, we need to bring it up.
emctl start dbconsole
Very good article, use this procedure to successfully restart my RAC.
ReplyDeletegood info
ReplyDelete