Archive

Archive for November, 2008

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

CRSCTL Help

Help for using crsctl command :

 crsctl delete css votedisk <path> – removes a voting disk
crsctl enable crs – enables startup for all CRS daemons
crsctl disable crs – disables startup for all CRS daemons
crsctl start crs – starts all CRS daemons.
crsctl stop crs – stops all CRS daemons. Stops CRS resources in case of cluster.
crsctl start resources – starts CRS resources.
crsctl stop resources – stops CRS resources.
crsctl debug statedump evm – dumps state info for evm objects
crsctl debug statedump crs – dumps state info for crs objects
crsctl debug statedump css – dumps state info for css objects
crsctl debug log css [module:level]{,module:level} …
- Turns on debugging for CSS
crsctl debug trace css – dumps CSS in-memory tracing cache
crsctl debug log crs [module:level]{,module:level} …
- Turns on debugging for CRS
crsctl debug trace crs – dumps CRS in-memory tracing cache
crsctl debug log evm [module:level]{,module:level} …
- Turns on debugging for EVM
crsctl debug trace evm – dumps EVM in-memory tracing cache
crsctl debug log res <resname:level> turns on debugging for resources
crsctl query crs softwareversion [<nodename>] – lists the version of CRS software installed
crsctl query crs activeversion – lists the CRS software operating version
crsctl lsmodules css – lists the CSS modules that can be used for debugging
crsctl lsmodules crs – lists the CRS modules that can be used for debugging
crsctl lsmodules evm – lists the EVM modules that can be used for debugging