srvctl cmd introduce

srvctl cmd introduce
srvctl can control the listener,instance,and services of the rac
(1)you can check the status of nodes by following cmd
oracle@rac2 crs$ *srvctl status nodeapps -n rac2*
VIP is running on node: rac2
GSD is running on node: rac2
Listener is running on node: rac2
ONS daemon is running on node: rac2
//*vip,gsd,listener,ons were called “nodeapps”*

(2)check the status of instance of one of the nodes(rac1)
*srvctl start|stop|status database -d*
oracle@rac2 crs$ *srvctl status instance -d rac -i rac1*
Instance rac1 is running on node rac1

(3)stop whole rac
//to stop the entire database named “rac”
oracle@rac2 crs$ *srvctl stop database -d rac*
//three resource options were *offline*,”instance”,”db”
oracle@rac2 crs$ crs_stat -t
Name Type Target State Host
————————————————————
*ora.rac.db application OFFLINE OFFLINE*
*ora….c1.inst application OFFLINE OFFLINE*
*ora….c2.inst application OFFLINE OFFLINE*
ora….C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora….C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

(4)check the configuration of whole rac env
oracle@rac2 crs$ *srvctl config database -d rac -a*
rac1 rac1 /u01/app/oracle/product/10.2.0/db_1
rac2 rac2 /u01/app/oracle/product/10.2.0/db_1
DB_NAME: rac
ORACLE_HOME: /u01/app/oracle/product/10.2.0/db_1
SPFILE: /u01/oradata/RAC/spfilerac.ora
DOMAIN: null
DB_ROLE: null
START_OPTIONS: null
POLICY: AUTOMATIC
ENABLE FLAG: DB ENABLED