Search This Blog

Total Pageviews

Wednesday 11 August 2010

List all srvctl commands

List all srvctl commands

srvctl –h

Shutdown service

srvctl stop service –d database_name

Shutdown the database on all nodes

srvctl stop database –d database_name

Shutdown a specific instance

srvctl stop instance –d database_name -i instance_name

Shutdown nodeapps (includes listener)

srvctl stop nodeapps –n node_name

! node_name is usually the hostname of the machine

Shutdown the listener

srvctl stop listener –n node_name

Shutdown ASM

srvctl stop asm –n node_name

To Startup, replace stop with start.

If you shutdown the database it will stop the service since the service is dependent upon the database. The reverse is also true. If you startup the service it will implicitly startup the database.

To check to see if your services are running.

$CRS_HOME/bin/crs_stat –t

If you want more detailed information, drop the –t.

$CRS_HOME/bin/crs_stat

You may include the $CRS_HOME/bin in your $PATH for ease of use

=====================================================================================
crs_stat command



crs_stat | awk -F= '/NAME=/{n=$2}/TYPE=/{t=$2}/TARGET=/{g=$2}/STATE=/{s=$2; printf("%-30s%-30s%-10s%-30s\n", n,t,g,s)}'
ora.DATA.dg ora.diskgroup.type ONLINE ONLINE on oracle-host01
ora.LISTENER.lsnr ora.listener.type ONLINE ONLINE on oracle-host01
ora.asm ora.asm.type ONLINE ONLINE on oracle-host01
ora.cssd ora.cssd.type ONLINE ONLINE on oracle-host01
ora.diskmon ora.diskmon.type ONLINE ONLINE on oracle-host01
ora.evmd ora.evm.type ONLINE ONLINE on oracle-host01
ora.ons ora.ons.type ONLINE ONLINE on oracle-host01
ora.orc11202.db ora.database.type ONLINE ONLINE on oracle-host01

Oracle DBA

anuj blog Archive