Managing 11gr2 RAC environment (Adding service using $ prompt)

Oracle RAC

rac1>$ crsctl check crs
rac1>$crsctl check has
rac1>#cd /u01/product/11.2.0/grid_home/bin
bin>./ocrcheck -local

Note: The default location of OCR is $ORACLE_HOME/cdata/rac1.olr

rac1>$srvctl status scan
#ifconfig -a|more

rac1>srvctl status scan
#ifconfig -a|more

rac1>$srvctl status scan_listener
$srvctl config scan
$srvctl config scan_listener
$crsctl check cluster -all
$crsctl query css votedisk
$crsctl query crs activeversion
$crsctl query crs softwareversion
$crsctl query crs activeversion

#xhost +
#su – oracle
$srvctl add service -s test -d hrms -r hrms1 -a hrms2 -P basic

Note: (where -d= database name, -r =prefered instance and -a =available instance)

rac1>$srvctl status service -s test -d hrms
$srvctl start service -s test -d hrms

rac1>su – oracle
$export ORACLE_SID=hrms1
$sqlplus scott/[email protected]
$cd $ORACLE_HOME/network/admin
$vi tnsnames.ora

$sqlplus scott/[email protected]
$srvctl config service -s test -d hrms

rac1>$ srvctl stop service -d hrms
$srvctl stop database -d hrms

#su – grid
$crsctl stop cluster -all (error)

rac1># cd /u01/product/11.2.0/grid_homr/bin
bin># ./crsctl stop cluster -all
bin># ./crsctl check cluster -all
bin># ./crsctl start cluster -all
bin># ./crsctl check cluster -all
#ps -ef | grep smon
# su – oracle
$ srvctl status database -d hrms

rac1>$ srvctl start database -d hrms
$ srvctl status database -d hrms
$ srvctl status service -d hrms
$ srvctl status listener
$ srvctl status nodeapps
$ srvctl status asm -n rac1
$ srvctl status asm -n rac2
$ srvctl status asm
$ srvctl config database -d hrms