You are on page 1of 4

01/01/2015 RAC impotant command

RAC impotant command

Queries: Check for main Clusterware services
1) select name from v$database; up(Check to see if all the Clusterware
2) select instance_name FROM components DEAMONS are running)
gv$instance; #check Event Manager up
3) SELECT inst_id , instance_number ps ­ef | grep  evmd
inst_no , instance_name inst_name, #check Cluster Synchronization Services
parallel , status, database_status up
db_status, active_state state, ps ­ef | grep ocssd
host_name host FROM gv$instance #check Cluster Ready Services up
ORDER BY inst_id; ps ­ef | grep crsd
4) select * from #check Oracle Notification Service
V$ACTIVE_INSTANCES; ps ­ef | grep ons

Monitoring RAC Command Check CRS_STAT to see all the resources
Check to see if Oracle Clusterware  $crs_stat OR $crs_stat ­t OR $crs_stat ­ls
PATH
To see if all RAC instances are up:
$echo $PATH | grep crs $crs_stat | grep ­A 4 inst

Check to see if Oracle Clusterware NAME=ora.CARAC.CARAC1.inst
is running TYPE=application
TARGET=ONLINE
$crsctl check crs STATE=ONLINE on suw­sohora­01

Check the Voting Disk Location To see if all the listeners are up:
$crs_stat ­t | grep lsnr
$crsctl query css votedisk
0. 0 /dev/raw/raw1 To see all the Services
located 1 votedisk(s). $crs_stat | grep ­A 4 cs
AND
How to stop/start Oracle $crs_stat ­t | grep srv
Clusterware – MUST be login as
ROOT To see if Database is up:
$crs_stat ­t | grep db
# crsctl stop crs
Stopping resources. This could take CSS,CRS,EVM appears healthy
several minutes. $crsctl check crs
Successfully stopped CRS resources. $ORA_CRS_HOME/bin/crsctl check crs
Stopping CSSD. $ORA_CRS_HOME/bin/crsctl check evmd
Shutting down CSS daemon. $ORA_CRS_HOME/bin/crsctl check cssd
Shutdown request successfully $ORA_CRS_HOME/bin/crsctl check crsd
issued.
Status of all instances and services
# crsctl start crs $ srvctl status database ­d orcl
Instance orcl1 is running on node linux1
How to disable/Enable Oracle Instance orcl2 is running on node linux2
Clusterware – MUST be login as
ROOT . Status of a single instance

If we want Oracle Clusterware not to $ srvctl status instance ­d orcl ­i orcl2
restart next time the system is Instance orcl2 is running on node linux2
data:text/html;charset=utf­8,%3Cdiv%20class%3D%22article­header%22%20style%3D%22margin%3A%200px%3B%20outline%3A%20none%3B%20pa… 1/4
01/01/2015 RAC impotant command

rebooted.
#crsctl disable crs Status of a named service globally across
#crsctl enable crs the database

$ srvctl status service ­d orcl ­s orcltest
How to check of OCR is not Service orcltest is running on instance(s)
damaged? orcl2, orcl1
$ocrcheck
Status of node applications on a particular
Check if OCR backup exists node
#ocrconfig ­showbackup
$ srvctl status nodeapps ­n linux1
Note: Always use RESTORE VIP is running on node: linux1
command to restore OCR from GSD is running on node: linux1
automated generated backups as Listener is running on node: linux1
shown from above command ONS daemon is running on node: linux1

How to take OCR output in a text Status of an ASM instance
file?
$ocrdump ocr_dump.log $ srvctl status asm ­n linux1
OR ASM instance +ASM1 is running on node
$ocrdump ­stdout ­xml linux1.
OR
$ocrdump ­stdout ­keyname SYSTEM List all configured databases
­xml
OR $ srvctl config database
$ocrdump ­stdout ­xml | more orcl

OCR Display configuration for our RAC
ocrconfig ­ showbackup database
ocrconfig ­ replace <ocr_file_nmae>
ocrcheck $ srvctl config database ­d orcl
linux1 orcl1
Voting Disk /u01/app/oracle/product/10.2.0/db_1
dd if=Voting_disk_nmae linux2 orcl2
out=backup_location /u01/app/oracle/product/10.2.0/db_1

crsctl query css votedisk Display all services for the specified
crsctl add css votedisk path cluster database
crsctl delete css votedisk path
crsctl query crs softwareversion $ srvctl config service ­d orcl
crsctl stop crs orcltest PREF: orcl2 orcl1 AVAIL:
crs_start ­all
crs_stop ­all Display the configuration for node
crsctl check crs applications ­ (VIP, GSD, ONS, Listener)
crsctl check cssd
crsctl check crsd $ srvctl config nodeapps ­n linux1 ­a ­g ­s ­l
crsctl check evmd VIP exists.: /vip­
crsctl check cluster linux1/192.168.1.200/255.255.255.0/eth0:eth1
GSD exists.
Check if OCR is in Shared ONS daemon exists.
Filesystem and local_only Listener exists.
 parameter set to FALSE
$more /etc/oracle/ocr.loc Display the configuration for the ASM
data:text/html;charset=utf­8,%3Cdiv%20class%3D%22article­header%22%20style%3D%22margin%3A%200px%3B%20outline%3A%20none%3B%20pa… 2/4
01/01/2015 RAC impotant command

ocrconfig_loc=/dev/raw/raw2 instance(s)
local_only=FALSE
Note: OCR must be located on $ srvctl config asm ­n linux1
Shared storage and must be +ASM1 /u01/app/oracle/product/10.2.0/db_1
accessable to all nodes at all the
times. Status
srvctl status database ­d <database
Log Directory Structure in Cluster srvctl status instance ­d <database> ­i
Ready Services: <instance>
srvctl status nodeapps ­n <node>
· srvctl status service ­d <database>
$ORA_CRS_HOME/crs/log :Contains srvctl status asm ­n <node>
trace files for the CRS resources.
·$ORA_CRS_HOME/crs/init : If any Cluster Services Offline
Contains trace files of the CRS
daemon during startup. Good place to Sample for make it to online
start with any CRS login problems. crs_stat ­v|grep _srv.cs
·$ORA_CRS_HOME/css/log : The
Cluster Synchronization (CSS) logs NAME=ora.racmstr.racmstr_srv.cs
indicate all actions such as NAME=ora.racslv.racslv_srv.cs
reconfigurations, missed check­ins,
connects, and disconnects from the dbrac2:/orafs/ecc>>
client CSS listener. In some cases, crs_statora.racslv.racslv_srv.cs
the logger logs messages with the NAME=ora.racslv.racslv_srv.cs
category of auth.crit for the reboots TYPE=application
done by Oracle. This could be used TARGET=OFFLINE
for checking the exact time when the STATE=OFFLINE
reboot occurred.
·$ORA_CRS_HOME/css/init : dbrac2:/orafs/ecc>>
Contains core dumps from the Oracle crs_startora.racslv.racslv_srv.cs
Cluster Synchronization Service
daemon (OCSSd) and the process ID Attempting to start `ora.racslv.racslv_srv.cs`
(PID) for the CSS daemon whose on member `dbrac2`
death is treated as fatal. If abnormal
restarts for CSS exist, the core files Start of `ora.racslv.racslv_srv.cs` on member
will have the format of core.<pid>. `dbrac2` succeeded.
·$ORA_CRS_HOME/evm/log : Log
files for the Event Volume Manager dbrac2:/orafs/ecc>> crs_stat ­t
(EVM) and evmlogger daemons. Not
used as often for debugging as the
CRS and CSS directories.
·$ORA_CRS_HOME/evm/init : PID
and lock files for EVM. Core files for
EVM should also be written here.
·$ORA_CRS_HOME/srvm/log:  Log
files for Oracle Cluster Registry
(OCR), which contains the details at
the Oracle cluster level.
·$ORA_CRS_HOME//log : Log files
for Oracle Clusterware (known as the
cluster alert log), which contains
diagnostic messages at the Oracle
cluster level. This is available from
Oracle database 10g R2.
data:text/html;charset=utf­8,%3Cdiv%20class%3D%22article­header%22%20style%3D%22margin%3A%200px%3B%20outline%3A%20none%3B%20pa… 3/4
01/01/2015 RAC impotant command

data:text/html;charset=utf­8,%3Cdiv%20class%3D%22article­header%22%20style%3D%22margin%3A%200px%3B%20outline%3A%20none%3B%20pa… 4/4

You might also like