Saturday, July 26, 2008

Clusterware Commands

To work efficiently on Clusterware one should be familier with commands.

Below are few commands which I came across while working on it.

-> To Check whether clusterware is up or not, and which services are up and running.

$CRS_HOME/bin > ./crs_stat -t

This is will show complete list of components installed and their status eg. on a RAC environment with ASM it will show following components.

Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node name
ora....03.lsnr application ONLINE ONLINE node name
ora....003.gsd application ONLINE ONLINE node name
ora....003.ons application ONLINE ONLINE node name
ora....003.vip application ONLINE ONLINE node name
ora....SM2.asm application ONLINE ONLINE node name
ora....04.lsnr application ONLINE ONLINE node name
ora....004.gsd application ONLINE ONLINE node name
ora....004.ons application ONLINE ONLINE node name
ora....004.vip application ONLINE ONLINE node name
ora.database.db application ONLINE ONLINE node name
ora....d1.inst application ONLINE ONLINE node name
ora....d2.inst application ONLINE ONLINE node name

-> To Start clusterware services

$CRS_HOME/bin > ./crsctl start crs

-> To Stop clusterware services

$CRS_HOME/bin > ./crsctl stop crs

-> To Start one specific service eg. after checking services status, you came to know that Listener is down on Node A, to bring that up :

$CRS_HOME/bin > ./srvctl start listener -n Node A

-> To check all the commands to start/stop/add etc related to clusterware services

$CRS_HOME/bin > ./srvctl

This will show all the avaliable commands