RAC Cheatsheet


RAC Cheatsheet
By Charles kim

  • EDOCPRD1 > cluvfy -h
  • USAGE:
  • cluvfy [ -help ]
  • cluvfy stage { -list | -help }
  • cluvfy stage {-pre|-post} [-verbose]
  • cluvfy comp { -list | -help }
  • cluvfy comp [-verbose]
  • EDOCPRD1 > oifcfg -help
  • Name:
  • oifcfg – Oracle Interface Configuration Tool.
  • Usage: oifcfg iflist [-p [-n]]
  • oifcfg setif {-node | -global} {/:}…
  • oifcfg getif [-node | -global] [ -if [/] [-type ] ]
  • oifcfg delif [-node | -global] [[/]]
  • oifcfg [-help]
  • – name of the host, as known to a communications network
  • – name by which the interface is configured in the system
  • – subnet address of the interface
  • – type of the interface { cluster_interconnect | public | storage }
  • EDOCPRD1 > ocrconfig -help
  • Name:
  • ocrconfig – Configuration tool for Oracle Cluster Registry.
  • Synopsis:
  • ocrconfig [option]
  • option:
  • -export [-s online]
  • – Export cluster register contents to a file
  • -import – Import cluster registry contents from a file
  • -upgrade [ []]
  • – Upgrade cluster registry from previous version
  • -downgrade [-version ]
  • – Downgrade cluster registry to the specified version
  • -backuploc – Configure periodic backup location
  • -showbackup – Show backup information
  • -restore – Restore from physical backup
  • -replace ocr|ocrmirror [] – Add/replace/remove a OCR device/file
  • -overwrite – Overwrite OCR configuration on disk
  • -repair ocr|ocrmirror – Repair local OCR configuration
  • -help – Print out this help information
  • EDOCPRD1 > crs_stat -h
  • Usage: crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_member]
  • crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_member]
  • crs_stat -p [resource_name [...]] [-q]
  • crs_stat [-a] application -g
  • crs_stat [-a] application -r [-c cluster_member]
  • crs_stat -f [resource_name [...]] [-q] [-c cluster_member]
  • crs_stat -ls [resource_name [...]] [-q]
  • crs_register –u resname
  • crs_profile
  • crs_relocate
  • crs_start
  • crs_stop
  • crs_unregister
  • NGSDVA > clscfg -h
  • clscfg: EXISTING configuration version 3 detected.
  • clscfg: version 3 is 10G Release 2.
  • clscfg — Oracle cluster configuration tool
  • This tool is typically invoked as part of the Oracle Cluster Ready
  • Services install process. It configures cluster topology and other
  • settings. Use -help for information on any of these modes.
  • Use one of the following modes of operation.
  • -install – creates a new configuration
  • -upgrade – upgrades an existing configuration
  • -downgrade – downgrades an existing configuration
  • -add – adds a node to the configuration
  • -delete – deletes a node from the configuration
  • -local – creates a special single-node configuration for ASM
  • -concepts – brief listing of terminology used in the other modes
  • -trace – may be used in conjunction with any mode above for tracing
  • WARNING: Using this tool may corrupt your cluster configuration. Do not
  • use unless you positively know what you are doing.
  • NGSDVA > crsctl
  • Usage: crsctl check crs – checks the viability of the CRS stack
  • crsctl check cssd – checks the viability of CSS
  • crsctl check crsd – checks the viability of CRS
  • crsctl check evmd – checks the viability of EVM
  • crsctl set css – sets a parameter override
  • crsctl get css – gets the value of a CSS parameter
  • crsctl unset css – sets CSS parameter to its default
  • crsctl query css votedisk – lists the voting disks used by CSS
  • crsctl add css votedisk – adds a new voting disk
  • crsctl delete css votedisk – 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 turns on debugging for resources
  • crsctl query crs softwareversion [] – 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
  • If necesary any of these commands can be run with additional tracing by
  • adding a “trace” argument at the very front.
  • Example: crsctl trace check css
  • Clusterware check: log files in $ORA_CRS_HOME/nodename
  • Crsctl check crs
  • Crsctl check cssd
  • Crsctl check crsd
  • Crsctl check evmd
  • Crsctl query crs softwareversion
  • Crsctl query crs softwareversion node2
  • Crsctl start crs
  • Crsctl stop crs
  • Crsctl debug log res “resname:level”
  • Interconnect check:
  • Oifcfg getif
  • olsnodes
  • disable auto reboot of aix nodes /etc/init*
  • EDOCPRD1 > ls -lrt /etc/init*
  • lrwxrwxrwx 1 root system 14 Feb 20 11:18 /etc/init -> /usr/sbin/init
  • -rw-r–r– 1 root system 2914 Feb 22 16:19 /etc/inittab.orig
  • -r-xr-xr-x 1 root system 3194 Feb 22 16:19 /etc/init.evmd
  • -r-xr-xr-x 1 root system 36807 Feb 22 16:19 /etc/init.cssd
  • -r-xr-xr-x 1 root system 4854 Feb 22 16:19 /etc/init.crsd
  • -r-xr-xr-x 1 root system 2226 Feb 22 16:19 /etc/init.crs
  • -rw-r–r– 1 root system 3093 Feb 22 21:58 /etc/inittab
  • OCR check:
  • Ocrcheck
  • Ocrconfig –export /tmp/dba/exp_ocr.dmp –s online
  • Ocrconfig –showbackup
  • ocrdump
  • VIP:
  • Ifconfig –a
  • Ifconfig en8 delete host1-vip
  • Ifconfig en8 delete host2-vip
  • Command = /apps/oracle/product/10.2.0/CRS/bin/racgons add_config ictcdb621:6200 ictcdb622:6200
  • Command = /apps/oracle/product/10.2.0/CRS/bin/oifcfg setif -global en8/10.249.199.0:public en9/172.16.32.0:cluster_interconnect
  • EDOCPRD1 > srvctl -h
  • Usage: srvctl [-V]
  • Usage: srvctl add database -d -o [-m ] [-p ] [-A /netmask] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s ] [-n ] [-y {AUTOMATIC | MANUAL}]
  • Usage: srvctl add instance -d -i -n
  • Usage: srvctl add service -d -s -r “” [-a ""] [-P ]
  • Usage: srvctl add service -d -s -u {-r “” | -a “”}
  • Usage: srvctl add nodeapps -n -o -A /netmask[/if1[|if2|...]]
  • Usage: srvctl add asm -n -i -o [-p ]
  • Usage: srvctl config database
  • Usage: srvctl config database -d [-a] [-t]
  • Usage: srvctl config service -d [-s ] [-a] [-S ]
  • Usage: srvctl config nodeapps -n [-a] [-g] [-o] [-s] [-l]
  • Usage: srvctl config asm -n
  • Usage: srvctl config listener -n
  • Usage: srvctl disable database -d
  • Usage: srvctl disable instance -d -i “
  • Usage: srvctl disable service -d -s “” [-i ]
  • Usage: srvctl disable asm -n [-i ]
  • Usage: srvctl enable database -d
  • Usage: srvctl enable instance -d -i “
  • Usage: srvctl enable service -d -s “” [-i ]
  • Usage: srvctl enable asm -n [-i ]
  • Usage: srvctl getenv database -d [-t ""]
  • Usage: srvctl getenv instance -d -i [-t ""]
  • Usage: srvctl getenv service -d -s [-t ""]
  • Usage: srvctl getenv nodeapps -n [-t ""]
  • Usage: srvctl modify database -d [-n ] [-m ] [-p ] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY}] [-s ] [-y {AUTOMATIC | MANUAL}]
  • Usage: srvctl modify instance -d -i -n
  • Usage: srvctl modify instance -d -i {-s | -r}
  • Usage: srvctl modify service -d -s -i -t [-f]
  • Usage: srvctl modify service -d -s -i -r [-f]
  • Usage: srvctl modify service -d -s -n -i [-a ] [-f]
  • Usage: srvctl modify asm -n -i -p
  • Usage: srvctl relocate service -d -s -i -t [-f]
  • Usage: srvctl remove database -d [-f]
  • Usage: srvctl remove instance -d -i [-f]
  • Usage: srvctl remove service -d -s [-i ] [-f]
  • Usage: srvctl remove nodeapps -n “” [-f]
  • Usage: srvctl remove asm -n [-i ] [-f]
  • Usage: srvctl setenv database -d {-t =[,=,...] | -T =}
  • Usage: srvctl setenv instance -d [-i ] {-t “=[,=,...]” | -T “=”}
  • Usage: srvctl setenv service -d [-s ] {-t “=[,=,...]” | -T “=”}
  • Usage: srvctl setenv nodeapps -n {-t “=[,=,...]” | -T “=”}
  • Usage: srvctl start database -d [-o ] [-c | -q]
  • Usage: srvctl start instance -d -i “” [-o ] [-c | -q]
  • Usage: srvctl start service -d [-s "" [-i ]] [-o ] [-c | -q]
  • Usage: srvctl start nodeapps -n
  • Usage: srvctl start asm -n [-i ] [-o ] [-c | -q]
  • Usage: srvctl start listener -n [-l ]
  • Usage: srvctl status database -d [-f] [-v] [-S ]
  • Usage: srvctl status instance -d -i “” [-f] [-v] [-S ]
  • Usage: srvctl status service -d [-s ""] [-f] [-v] [-S ]
  • Usage: srvctl status nodeapps -n
  • Usage: srvctl status asm -n
  • Usage: srvctl stop database -d [-o ] [-c | -q]
  • Usage: srvctl stop instance -d -i “” [-o ] [-c | -q]
  • Usage: srvctl stop service -d [-s "" [-i ]] [-c | -q] [-f]
  • Usage: srvctl stop nodeapps -n
  • Usage: srvctl stop asm -n [-i ] [-o ] [-c | -q]
  • Usage: srvctl stop listener -n [-l ]
  • Usage: srvctl unsetenv database -d -t “
  • Usage: srvctl unsetenv instance -d [-i ] -t “
  • Usage: srvctl unsetenv service -d [-s ] -t “
  • Usage: srvctl unsetenv nodeapps -n -t “
  • source and reference:
  • http://www.dbaexpert.com/blog/2007/07/rac-cheatsheet/

0 comments:

Post a Comment