SRVCTL Funcionality
Here following the srvctl funcionality :
srvctl -h
Usage: srvctl [-V]
Usage: srvctl add database -d <name> -o <oracle_home> [-m <domain_name>] [-p <spfile>] [-A <name|ip>/netmask] [-r {PRIMARY | PH
YSICAL_STANDBY | LOGICAL_STANDBY}] [-s <start_options>] [-n <db_name>] [-y {AUTOMATIC | MANUAL}]
Usage: srvctl add instance -d <name> -i <inst_name> -n <node_name>
Usage: srvctl add service -d <name> -s <service_name> -r “<preferred_list>” [-a "<available_list>"] [-P <TAF_policy>]
Usage: srvctl add service -d <name> -s <service_name> -u {-r “<new_pref_inst>” | -a “<new_avail_inst>”}
Usage: srvctl add nodeapps -n <node_name> -o <oracle_home> -A <name|ip>/netmask[/if1[|if2|...]]
Usage: srvctl add asm -n <node_name> -i <asm_inst_name> -o <oracle_home> [-p <spfile>]
This is a long list and you will see that it covers all the srvctl commands.
Querying Config Cluster Database and Services
[oracle@vmora01rh4 ~]$ srvctl config database
fokerac
[oracle@vmora01rh4 ~]$ srvctl config database -d fokerac -a -t
Example client-side TNS entry for service fokeserv:
fokeserv = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db_vip)(PORT=dedicated_port))(CONNECT_DATA=(SERVICE_NAME=fokeserv.mydomain.nl)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))))
[oracle@vmora01rh4 ~]$ srvctl config service -d fokerac -s fokeserv -a
fokeserv PREF: fokerac2 fokerac1 AVAIL: TAF: basic
Querying the nodes for all running services
(Note that you also have the crsctl command line to do a lot of work for you. When we will do our installation on RedHat 4.2 Nahant on two nodes with Oracle 10g Release 2, I will discuss more on the crsctl and other related tools such as OCRcheck, crs_stat, crs_register, crs_unregister etc.)
[oracle@vmora01rh4 ~]$ srvctl config nodeapps -n vmora01rh4 -a -g -s -l
VIP exists.: /vmora01rh4-vip/172.22.202.75/255.255.255.0/eth0
GSD exists.
ONS daemon exists.
Listener exists.
[oracle@vmora01rh4 ~]$ srvctl config nodeapps -n vmora02rh4 -a -g -s -l
VIP exists.: /vmora02rh4-vip/172.22.202.76/255.255.255.0/eth0
GSD exists.
ONS daemon exists.
Listener exists.
Querying the nodes for ASM Configurations
[oracle@vmora01rh4 ~]$ srvctl config asm -n vmora01rh4
+ASM1 /u01/app/oracle/product/10.2.0/db_1
[oracle@vmora01rh4 ~]$ srvctl config asm -n vmora02rh4
+ASM2 /u01/app/oracle/product/10.2.0/db_1
Querying all nodes for Listeners Configuration
[oracle@vmora01rh4 ~]$ srvctl config listener -n vmora01rh4
vmora01rh4 LISTENER_VMORA01RH4
[oracle@vmora01rh4 ~]$ srvctl config listener -n vmora02rh4
vmora02rh4 LISTENER_VMORA02RH4
Getting Status of various services
srvctl status darabase -d dbname -f -v
srvctl status database -d dbname
srvctl status asm -n node_name
srvctl status instance asm -n node_name
srvctl status database -d dbname -f -v -S servicename
Checking Version of SRVCTL
SRVCTL -V
Reference : Oracle RAC Guide Documnetation
Recent Comments