As an experienced DBA, we must know the basic commands in RAC for Oracle DBA. So, today in this article, we will learn some basic commands in RAC (Oracle Database) like how to stop/start cluster, how to stop/start databases, instances etc.
Table of Contents :
Stop/Start Cluster Services in RAC:
Recommended from root user :
Check the Cluster service status :
cd $ASM_HOME/bin
crsctl check crs
![command for cluster status check](https://dbapostmortem.com/wp-content/uploads/2023/05/crs-status-check-1.png)
1.Stop cluster services in one node
cd $ASM_HOME/bin crsctl stop crs
![Basic Commands in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/crs-stop-1024x672.png)
2. Start cluster services in one node
cd $ASM_HOME/bin crsctl start crs
![basic Commands in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/crs-start.png)
Stop all the clusters at once:
crsctl check crs
crsctl stop cluster -all
![check cluster status in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/crs-check-in-both-nodes-1024x138.png)
![stop all the clusters at once in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/stop-all-cluster-at-once-1024x598.png)
Start cluster at once :
crsctl start cluster -all
![start all the clusters at once in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/start-cluster-at-once.png)
Stop/start the database from all nodes in RAC :
From oracle user :
srvctl stop database -d <db_unique_name> srvctl start database -d <db_unique_name> srvctl status database -d <db_unique_name>
![stop database in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/stop-database-in-RAC-1024x110.png)
Stop/start the instance from any of the nodes in RAC :
Suppose we want to stop/start the instance in node 1 only
srvctl stop instance -d <db_unique_name> -i <instance_name>
srvctl start instance -d <db_unique_name> -i <instance_name>
![command to stop instance in RAC](https://dbapostmortem.com/wp-content/uploads/2023/05/stop-instance-in-RAC.png)
So here are some basic commands in RAC that will help you in you daily DBA tasks.You can also follow the Oracle Documentation for the same.