Professional Documents
Culture Documents
Knowledge Article - OCR Backup and Restore
Knowledge Article - OCR Backup and Restore
Knowledge Article - OCR Backup and Restore
OCR file records cluster information of RAC and if OCR is affected then RAC will comes to halt.
By default, oracle takes the backup of OCR file for every four hours, at the end of the day & at the
end of the week. Out of all the nodes in RAC one of the nodes will be designated as Master Node
and it takes the backup of OCR file.
Whenever we make some structural changes to the cluster like adding a node, creating a new
services, database etc it is always recommended to take the back up of OCR file manually as it takes
backup for every 4 hours in version 10g.
From 11gr2 it takes the OCR backup automatically whenever there is a structural change.
When you bring down the node 1 then Node 2 will become master node.
[oracle@rac2 crsd]$
[oracle@rac2 crsd]$ grep -i 'ocr master' crsd.log |tail -1
2018-11-27 22:47:27.079: [ OCRMAS][1102379328]th_master:13: I AM THE NEW OCR MASTER at
incar 2. Node Number 2
[oracle@rac2 bin]$
Imagine OCR file has been corrupted and we are going to restore it from backup.
Here we have 2 node RAC setup with node name rac1 and rac2. Here we are performing restore of
OCR file from rac2 node.
Start the crs in the exclusive mode, so that ASM would be accessible by reading OLR file.
Make sure CRSD is not running while restoring OCR file.
OLR is the first file that is accessed to start-up clusterware when OCR is stored on ASM. OCR
should be accessible to find out the resources which need to be started on a node. If OCR is on
ASM, it can’t be read until ASM is up. To resolve this problem, information about the resources
which need to be started on a node is stored in an operating system file which is called Oracle
Local Registry or OLR. Since OLR is an operating system file, it can be accessed by various
processes on the node for read/write irrespective of the status of the clusterware (up/down).
Hence, when a node joins the cluster, OLR on that node is read, various resources ,including
ASM are started on the node . Once ASM is up, OCR is accessible and is used henceforth to
manage all the clusterware resources. If OLR is missing or corrupted, clusterware can’t be
started on that node.
NAME=ora.cluster_interconnect.haip
TYPE=ora.haip.type
TARGET=ONLINE
STATE=ONLINE on rac2
NAME=ora.crf
TYPE=ora.crf.type
TARGET=OFFLINE
STATE=OFFLINE
NAME=ora.crsd
TYPE=ora.crs.type
TARGET=ONLINE
STATE=INTERMEDIATE on rac2
Once OCR file has been restored, then stop the crs services.
Disk group for ocr location "+OVDG" available on all the nodes
NOTE:
This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user
to verify the contents of OCR.