Oracle 10g RAC Utilities by michael A. Georgiou
This article provides a small tutorial for all the RAC utilities, that are available in oracle rac 10g r2. the srvctl utility is not covered in this document.
olsnodes
olsnodes : is used to list cluster's members
olsnodes -n --returns the cluster's nodes associated with each cluster number
olsnodes -i --returns cluster's nodes associated with each number and vip name
olsnodes -l --returns the local member name and cluster number
crsctl ( as root)
crsctl : The cluster control is responsible manage the cluster components , the main options are the following:
crsctl stop crs --stop the cluster the same as /etc/init.d/init.crs stop
crsctl start crs --start the cluster , the same as /etc/init.d/init.crs start
crsctl disable crs --disable cluster to start automatically
crsctl enable crs --enable cluster to start automatically
crsctl lsmodule [crs|evm|css] --list the available modules per cluster components, these modules can be used later for debugging purposes.
crsctl check crs --check all daemons(crsd,evmd,cssd) if are healthy
crsctl add css vodedisk
crsctl delete css vodedisk
crsctl debug log [crs|evm|css] "MODULE:DEGUG_LEVEl[,..]" --enable debugging
crsctl debug log res "RESOURCE:DEGUG_LEVEl[,..]" --enable debugging
All logs are available under
$CRS_HOME/log/hostname/crs
/cssd
/evmd
/crsd
$CRS_HOME/bin/diagcollection.pl -- this perl script collect information for diagnostic purposes.
racgons
racgons : It used to register a middle tier node[s] , such a ons server
racgons add_config node1:port,nodeN:port
racgons remove_config node1:port
ocrcheck
ocrcheck : Block by block check on ocr and ocr mirror files , it is returns
- ocr file space details ( total space,available space,used space)
- ocr id
- ocr and ocr mirror location
ocrdump
ocrdump : consolitate ocr into a dump file
ocrdump --create an ocr dump , by default the OCRDUMPFILE is created
ocrdump mydump
ocrdump mydump -stdout -keyname system --create an ocr dump ,dumping only the system keyname
ocrdump mydump -stdout xml
evmwatch
evmwatch : waits for event to happen
evmwatch -A -t "@ timestamp @@"
evmpost
evmpost : port event to node[s]
evmpost -u "hello" node
ocrconfig
ocrconfig : ocr file administration
ocrconfig -backuploc
ocrconfig -showbackup ---show the backups that are done
ocrconfig -overwrite ---overwrite the contents of the ocr loacted in local sga to disk
ocrconfig -repair --repair ocr file
ocrconfig -export -- export ocr file
ocrconfig -import --import and exported file
ocrconfig -replace ocr| ocr mirror --change ocr file
ocrconfig -restore --restore ocr backup as listed via showbackup option
ocrconfig -upgrade
ocrconfig -downgrade
oifcfg
oifcfg : Oracle's network interface configuration tools . This tools set which network interface will plays the role of public or private interconnect
oifcfg iflist ---> returns the if_name and the subnet ( if_name can be the eth0,eth1 etc)
oifcfg getif ---> return the if_name,subnet and if_type ( the if_type can be global public or private interconnect)
oifcfg setif -global eth3/192.168.10.0:private_interconnect ---> add a second private_interconnect network interface in cluster, the global option is applied in all nodes.
oifcfg delif -global eth3/192.168.10.0:private_interconnect
oifcfg delif -global --delete all global interfaces
clscfg
clscfg : Cluster configuration , with this tool you can register/add a new node in a cluster
clscfg -add -nn node3,3 -pn node3-priv,3 -hn node3,3
cluvfy
cluvfy: Cluster verification utility for following areas in the cluster
- Installation verification ( inst)
- Storage verification (ssa,space)
- Cluster integrity (clu)
- Cluster components (crs,ocr,cfs)
- user and Permissions (admprv)
- Connectivity (conn)
- System requirements verification (sys)
- Arguments and Options (peer)
cluvfy comp -list ---list of the valid components for verification
cluvfy stage -list ---list the valid stage of the verification ( pre stage and post stage e.g the system is able for oracle database installation)
clucfy comp -clu ----check the integrity of your entire cluster, which is mean to verify that all of the nodes in the cluster have the same view of the cluster configuration
cluvfy comp -sys -n all -p crs -verbose ---Verify the min system requirement on cluster nodes prior to installing oracle cluster ware.
cluvfy comp -ssa -n all -s /dev/sda ----Discover all of the shared storage system available on cluster on system /dev/sda
cluvfy comp -space -n all -l /oracle -z 2G ---Verify the availability of at least 2G of free space
cluvfy comp cfs -n all -F /ocfs-disk ---Verify the integrity of the cluster file system
cluvfy comp -admprv -n all
-o user_priv
-o crs_inst
-o db_inst
-o db_config -d $ORACLE_HOME
Verify user privileges , user privileges to install crs and install and configure database
cluvfy comp -conn -n all --- Discover all of the network interfaces that are available on the cluster nodes
cluvfy comp peer -n all -r 10gR2 -- compare all the node in the cluster
cluvfy comp peer -refnode rac1 -n rac2,rac3 -r 10gR2 -- compare all the node in the cluster base on rac1
cluvfy comp -stage -post crsinst -n all ---Verify the crs installation
cluvfy comp -stage -pre dbinst -n all -r 10gR2 --Verify that the system is configured properly in order to proceed with database installation
cluvfy stage -pre dbcfg -n all -d $ORACLE_HOME ---Verify whether your system meet all of the criteria for creating a database or for making a database configuration change