fbpx

crsctl Commands Cheat Sheet

Oracle Clusterware is a software component provided by Oracle Corporation that enables the management and coordination of multiple servers in a cluster environment. It provides high availability and scalability for Oracle databases and other applications by allowing multiple servers to work together as a single system. Oracle Clusterware handles tasks such as node membership, resource management, and failure detection and recovery within the cluster.

In all the commands I suppose crsctl is in your path

$GRID_HOME/bin/crsctl

This is the list of Oracle crsctl commands you need to use to manage your Oracle clusterware.

To check all the crs resources:

crsctl stat res -t -init
crsctl stat res -t

Sometimes the services might not even be up or down but in the Unknown state or intermediary state.

crsctl stat res -t -w "((TARGET != ONLINE) or (STATE != ONLINE)"

To search for a given name

crsctl status res -t -w "NAME co bas01nfi"

To stop the Oracle Clusterware on the local node

crsctl stop crs [-f]

Use -f to force the stop.

To disable Oracle Clusterware, so that it does not start when rebooting a node

crsctl disable crs

Then if you want to enable it again

crsctl enable crs

Status, Configuration and Checking cluster resources

crsctl check crs # Status CRS Services

crsctl check cluster -n rac2 # Status Cluster Services

crsctl check ctss # Status The Cluster Time Synchronization Service

crsctl config crs (requires root) # checks if Oracle High Availability Services autostart is enabled

crsctl stat res ora.rac.db -p # Print static configuration

crsctl stat res ora.rac.db -f # Print full configuration

crsctl query css votedisk # Voting Disks Status

olsnodes -n -i -s -t # List Cluster Nodes

oifcfg getif # Info about network Interfaces

ocrcheck # Status OCR (execute as root to check logical corruption)

ocrcheck -local (requires root) # OCR Status with CRS/OHAS OFFLINE

ocrconfig -showbackup # Backup info about OCR

ocrconfig -add +TEST # Create a copy of OCR in another Diskgroup

cluvfy comp crs -n rac1 # Verify CRS Integrity

Leave a Reply

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