RAC Database Shutdown Procedure

Introduction

When it comes to managing an Oracle Real Application Clusters (RAC) database, proper shutdown procedures are crucial to maintain data integrity and prevent potential issues. In this short blog post, we’ll guide you through the step-by-step process of shutting down an Oracle RAC DB in sequence using commands, ensuring a smooth and safe shutdown.

How to Shutdown Oracle Real Application Clusters Database ?

  1. Shutdown Oracle Listener.
  2. Shutdown RAC Database Instances on all nodes.
  3. Shutdown ASM instances from all nodes.
  4. Shutdown Node applications on all nodes.
  5. Shut down Oracle Clusterware / CRS.

1. Shutdown Oracle Listener

##To stop listener from all nodes##

[grid@node1 ~]$ srvctl stop listener




##To Check Status of listener##

[grid@node1 ~]$ srvctl status listener

Listener LISTENER is enabled
Listener LISTENER is not running on node(s): node1,node2





##OTHER COMMANDS##

##To stop listener for a 1 particular node##

[grid@node1 ~]$ srvctl stop listener -n node1



##To check listener status of a particular node##

[grid@node1 ~]$ srvctl status listener -n node1

Listener LISTENER is enabled on node(s): node1
Listener LISTENER is not running on node(s): node1

2. Shutdown RAC Database Instances on all nodes

##To Stop database instances on all Nodes##
##Execute this command from any node having database, it will stop all database instances on all servers##

[oracle@node1 ~]$ srvctl stop database -d DBPROD




##To Check database instances Status of all Nodes##

[oracle@node1 ~]$ srvctl status database -d DBPROD

Instance DBPROD1 is not running on node node1
Instance DBPROD2 is not running on node node2






##OTHER COMMANDS##

##To Stop any specific database instance ##

[oracle@node1 ~]$ srvctl stop instance -d DMRPROD -i DMPROD1




##To Check status of any specific database instance ##

[oracle@node1 ~]$ srvctl status instance -d DMRPROD -i DMPROD1

Instance DMPROD1 is running on node node1

3. Shutdown ASM instances from all nodes

##To Stop ASM instances on all Nodes##

[grid@node1 ~]$ srvctl stop asm




##To Check Status of ASM instances on all Nodes##

[grid@node1 ~]$ srvctl status asm

ASM is running on node1,node2






##OTHER COMMANDS##

###Sometimes we get issues in stopping ASM instance, In that case use "-f" option to forcefully shutdown ASM 
instances####

##To Stop any specific ASM instance ##

[grid@node1 ~]$ srvctl stop asm -n node1 -f




##To Check status of any specific ASM instance ##

[grid@node1 ~]$ srvctl status asm -n node1
ASM is not running on node1

4. Shutdown Node applications on all nodes

##To Stop Nodeapps on all Nodes##

[grid@node1 ~]$ srvctl stop nodeapps



##To Check Status of Nodeapps on all Nodes##

[grid@node1 ~]$ srvctl status nodeapps

VIP 192.168.1.73 is enabled
VIP 192.168.1.73 is running on node: node1

VIP 192.168.1.74 is enabled
VIP 192.168.1.74 is running on node: node2

Network is enabled
Network is running on node: node1
Network is running on node: node2

ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2







##OTHER COMMANDS##

###If you face any issue in stopping node applications use "-f" as force option to stop applications####


##To Stop any specific nodeapps on particular node ##

[grid@node1 ~]$  srvctl stop nodeapps -n node1 -f





##To Check status of specific node nodeapps##

[grid@node1 ~]$ srvctl status nodeapps -n node1

VIP 192.168.1.73 is enabled
VIP 192.168.1.73 is running on node: node1

Network is enabled
Network is running on node: node1

ONS is enabled
ONS daemon is running on node: node1

5. Shut down Oracle Clusterware / CRS

##Go to $GRID_HOME/bin directory through root user##

[root@node1 bin]# pwd

/u01/app/12.2.0/grid/bin




##To Check Cluster Status of All Nodes##

[root@node1 bin]# ./crsctl check cluster -all

**************************************************************
node1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

*************************************************************
node2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************






## To Stop CRS on Node1##

###Need to Run on All Nodes 1 by 1###

[root@node1 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1'
CRS-2673: Attempting to stop 'ora.crsd' on 'node1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'node1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'node1'
CRS-2673: Attempting to stop 'ora.node2.vip' on 'node1'
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'node1'
CRS-2677: Stop of 'ora.gipcd' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'node1'
CRS-2677: Stop of 'ora.gpnpd' on 'node1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node1' has completed
CRS-4133: Oracle High Availability Services has been stopped.







[root@node2 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node2'
CRS-2673: Attempting to stop 'ora.crsd' on 'node2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'node2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'node2'
CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
CRS-2677: Stop of 'ora.cssd' on 'node2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'node2'
CRS-2677: Stop of 'ora.gipcd' on 'node2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'node2'
CRS-2677: Stop of 'ora.gpnpd' on 'node2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node2' has completed
CRS-4133: Oracle High Availability Services has been stopped.

Other Commands for Clusterware / CRS

##Start entire cluster on all nodes##

[root@node1 bin]# ./crsctl start clusterall





##Check Cluster status on all nodes##

[root@node1 bin]# ./crsctl check cluster -all





##Check cluster services in table format##

[root@node1 bin]# ./crsctl status resource -t


##or##


[root@node1 bin]# ./crsctl stat res -t






##To Enable or Disable Cluster Auto Restart##

[root@node1 bin]# ./crsctl disable has

[root@node1 bin]# ./crsctl enable has

Conclusion

Properly shutting down an Oracle RAC database in sequence is a critical task to maintain data consistency and prevent potential issues. By following the step-by-step guide outlined in this blog, you can ensure a smooth and safe shutdown of your Oracle RAC DB and its associated Clusterware. Always remember to take backups before performing any maintenance tasks to mitigate risks and ensure data protection.

RAC Database Startup Procedure

Leave a Comment

Your email address will not be published. Required fields are marked *