Oracle Clusterware Useful Commands

Oracle Clusterware is a software suite that provides infrastructure for Oracle Real Application Clusters (RAC) to enable high availability and scalability. It manages cluster resources such as databases and applications, ensuring they run smoothly across multiple servers. Clusterware monitors the health of these resources and automatically handles failures to minimize downtime.

Check Cluster Services
crsctl check cluster
crsctl check crs
crsctl check has

Check status CRS Nodes
olsnodes
olsnodes -n

Check Private Interconnect of connected Node
olsnodes -l -p

Check Virtual IP of Nodes
olsnodes -i
olsnodes -i node1

Check Status of Nodes
olsnodes -s

Check Clusterware Name
olsnodes -c

Check global public and global cluster_interconnect :
oifcfg getif

Start Cluster All Service
su - root
cd $GRID_HOME/bin
crsctl start crs

Check CRS Version
crsctl query crs softwareversion

Oracle Clusterware active version
crsctl query crs activeversion

Enable Cluster for Autostart
crsctl enable crs

Disable Cluster for Autostart
crsctl disable crs

Stop Cluster All Service
su - root
cd $GRID_HOME/bin
crsctl stop crs

Stop Cluster All Service on All Available Node2
crsctl stop cluster -all

Start Cluster All Service on All Available Node2
crsctl start cluster -all

Check Status of Cluster Resources
crsctl status resource -t
crsctl stat res -t
crs_stat -t
crsctl status res -t

Stop Cluster Specific Resource
crsctl start resource
crsctl stop resource

Check ASM Disk Group Size
asmcmd lsdg

Check ASM Disk Size
asmcmd lsdsk

Check All Configuration of Cluster
srvctl config all

Check Specific Database Configuration
srvctl config database -d TESTRACDB

Check Status of Node
srvctl status nodeapps

Check Current Configuration of Scan
srvctl config scan

Stop Scan Listener
srvctl stop scan_listener

Start Scan Listener
srvctl start scan_listener

Check Status of Scan
srvctl status scan

Check Status of Scan Listener
srvctl status scan_listener

Health Check of OCR
ocrcheck

Check Backup of OCR
ocrconfig -showbackup

Take Backup of OCR
ocrconfig -manualbackup

Change Backup Location of OCR
ocrconfig -backuploc /backups/ocr

Modify SPFILE on Database within Cluster Configuration
srvctl modify database -d PRIM -spfile +DATA/PRIM/spfile
srvctl modify database -d PRIM -p +DATA/PRIM/spfile

Register Database and Instance in Cluster
srvctl add database -d y100d -o /optware/oracle/11.2.0.4/db_1
srvctl add instance -d y100d -i y100d1 -n kxxxxsgtu21

Check Status Specific Database
srvctl status database -d

Start Specific Database
srvctl start database -d

Stop Specific Database
srvctl stop database -d

Check Status Specific Database Instance on Particular Node
srvctl status instance -d -i

Start Specific Database Instance on Particular Node
srvctl start instance -d -i

Stop Specific Database Instance on Particular Node
srvctl stop instance -d -i

Stop Listener on Specific Node
srvctl stop listener -n racnode1

Start Listener on Specific Node
srvctl stop listener -n racnode1

Stop ASM on Specific Node
srvctl stop asm -n racnode1 -f

Start ASM on Specific Node
srvctl stop asm -n racnode2 -f

Check Log File
crsctl query cssd logfile
$ORACLE_BASE/diag/crs/crs/trace/alert.log

Check Alert Log File of ASM
tail -f $ORACLE_BASE/diag/asm/+asm/+ASM1/trace/alert_+ASM1.log

Check Alert Log File of Database
tail -f $ORACLE_BASE/diag/rdbms///trace/alert_.log