Introduction:
Managing Oracle RAC environments requires a clear understanding of cluster-related utilities such as CRSCTL and SRVCTL. These tools are essential for controlling cluster resources, monitoring services, and performing routine administrative tasks. This cheat sheet provides commonly used CRSCTL and SRVCTL commands in a simple and practical format, making it easy to use during daily operations.
What Is CRSCTL in Oracle RAC
CRSCTL (Cluster Ready Services Control) is used to manage and monitor Oracle Clusterware components. It helps control cluster resources, check cluster status, and perform node-level operations.
What Is SRVCTL in Oracle RAC
SRVCTL (Server Control Utility) is used to manage Oracle database resources such as databases, instances, listeners, and services in a RAC environment.
CRSCTL Commands (Cluster Management)
Check Cluster Statuscrsctl check crs crsctl check cluster crsctl check cluster -allCheck Cluster Components
crsctl check cssd crsctl check crsd crsctl check evmd crsctl check hasCheck Cluster Resources
crsctl stat res -t crsctl stat res -t -initCheck Cluster Configuration
crsctl config crs crsctl get nodenameCheck Voting Disk and OCR
crsctl query css votedisk ocrcheckStart and Stop CRS Stack
crsctl start crs crsctl stop crs
CRSCTL Commands for Cluster Start and Stop Operations
Stop Grid Clustercrsctl stop has crsctl stop has -n orcl2 crsctl stop cluster -all crsctl stop cluster -n orcl2Start Grid Cluster
crsctl start has crsctl start has -n orcl2Enable or Disable Auto Start
crsctl start cluster -all crsctl start cluster -n orcl2
crsctl disable has crsctl enable has crsctl disable crs crsctl enable crsVersion and Cluster Info Commands
crsctl query crs softwareversion crsctl query crs activeversion
SRVCTL Commands (Database and Resource Management)
Database Managementsrvctl start database -d ORCL -o open srvctl stop database -d ORCL -o immediateInstance Management
srvctl status database -d ORCL
srvctl start instance -d ORCL -i ORCL1Service Management
srvctl stop instance -d ORCL -i ORCL1
srvctl status instance -d ORCL
srvctl start service -d ORCL -s SERVICE_NAMEAdd and Remove Database
srvctl stop service -d ORCL -s SERVICE_NAME
srvctl status service -d ORCL -s SERVICE_NAME
srvctl relocate service -d ORCL -service SERVICE_NAME -oldinst INST1 -newinst INST2
srvctl add database -d ORCL -o ORACLE_HOME -p SPFILEAdd and Remove Instance
srvctl remove database -d ORCL -f -y
srvctl add instance -d DBNAME -i INST1 -n NODE1 srvctl remove instance -d DBNAME -i INST1Enable / Disable Database and Instance
srvctl enable database -d ORCL srvctl disable database -d ORCL srvctl enable instance -d ORCL -i ORCL1Listener Management
srvctl disable instance -d ORCL -i ORCL1
srvctl status listener srvctl start listener srvctl stop listenerConfiguration Commands
srvctl config database -d ORCL srvctl config service -d ORCL srvctl config network srvctl config all
Difference Between CRSCTL and SRVCTL
- CRSCTL manages clusterware components
- SRVCTL manages database and RAC resources
- CRSCTL works at cluster level
- SRVCTL works at database and service level
Best Practices
- Use SRVCTL for database operations instead of manual startup
- Avoid stopping CRS unless required
- Always verify status before and after operations
- Use node-specific commands carefully in multi-node environments
Conclusion: CRSCTL and SRVCTL are essential utilities for managing Oracle RAC environments. Understanding these commands helps control cluster services, manage databases efficiently, and maintain high availability. This cheat sheet serves as a quick reference for commonly used commands, making RAC administration simple and efficient.
