CRSCTL and SRVCTL Commands Cheat Sheet for Oracle RAC

Oracle RAC CRSCTL and SRVCTL commands cheat sheet with examples for managing cluster, database, instances, and services efficiently.

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 Status
crsctl check crs
crsctl check cluster
crsctl check cluster -all
Check Cluster Components
crsctl check cssd
crsctl check crsd
crsctl check evmd
crsctl check has
Check Cluster Resources
crsctl stat res -t
crsctl stat res -t -init
Check Cluster Configuration
crsctl config crs
crsctl get nodename
Check Voting Disk and OCR
crsctl query css votedisk
ocrcheck
Start and Stop CRS Stack
crsctl start crs
crsctl stop crs

CRSCTL Commands for Cluster Start and Stop Operations

Stop Grid Cluster
crsctl stop has
crsctl stop has -n orcl2
crsctl stop cluster -all
crsctl stop cluster -n orcl2
Start Grid Cluster
crsctl start has
crsctl start has -n orcl2
crsctl start cluster -all crsctl start cluster -n orcl2
Enable or Disable Auto Start
crsctl disable has
crsctl enable has
crsctl disable crs
crsctl enable crs
Version and Cluster Info Commands
crsctl query crs softwareversion
crsctl query crs activeversion

SRVCTL Commands (Database and Resource Management)

Database Management
srvctl start database -d ORCL -o open
srvctl stop database -d ORCL -o immediate
srvctl status database -d ORCL
Instance Management
srvctl start instance -d ORCL -i ORCL1
srvctl stop instance -d ORCL -i ORCL1
srvctl status instance -d ORCL
Service Management
srvctl start service -d ORCL -s SERVICE_NAME
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
Add and Remove Database
srvctl add database -d ORCL -o ORACLE_HOME -p SPFILE
srvctl remove database -d ORCL -f -y
Add and Remove Instance
srvctl add instance -d DBNAME -i INST1 -n NODE1
srvctl remove instance -d DBNAME -i INST1
Enable / Disable Database and Instance
srvctl enable database -d ORCL
srvctl disable database -d ORCL
srvctl enable instance -d ORCL -i ORCL1
srvctl disable instance -d ORCL -i ORCL1
Listener Management
srvctl status listener
srvctl start listener
srvctl stop listener
Configuration 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.

Post a Comment

© Ayaan Israr - All rights reserved. Premium By Ayaan Israr