IS OCR backup automatic?

Oracle cluster registry is a crucial file which stores the cluster configuration information and all the node database instance details.

We can choose separate diskgroups for OCR as candidate disk to store it on ASM diskgroup during installation

Without OCR file ,the clusterware couldnot identify the instance information of the neighbouring nodes!!

CRS daemon stores the configuration of OCR and takes the automatic backup of OCR for every 4 hours on the RAC

OCR architecture:

In 11gr2 and 12c versions,OCR can have upto five mirrored copies

The storage where datafiles reside should be accessed by all the nodes.

The CRS daemon is responsible for writing the data and disk I/O from the cache in the memory

To get the details of the previous backups we can use the ocrconfig!!

[oracle@RAC1 ~]$ ocrconfig -showbackup

rac2     2019/12/16 15:49:43     /grid/11.2.0/grid/cdata/RAC-scan/backup00.ocr

rac2     2019/12/16 11:47:27     /grid/11.2.0/grid/cdata/RAC-scan/backup01.ocr

rac3     2019/11/08 02:15:53     /grid/11.2.0/grid/cdata/RAC-scan/backup02.ocr

rac2     2019/12/16 11:47:27     /grid/11.2.0/grid/cdata/RAC-scan/day.ocr

rac2     2019/12/16 11:47:27     /grid/11.2.0/grid/cdata/RAC-scan/week.ocr

rac2     2019/07/16 16:03:14     /grid/backup_20190716_160314.ocr

rac2     2019/07/16 13:41:40     /grid/11.2.0/grid/cdata/RAC-scan/backup_20190716_134140.ocr

rac2     2019/07/16 13:12:30     /grid/11.2.0/grid/cdata/RAC-scan/backup_20190716_131230.ocr

rac2     2019/07/16 13:07:47     /grid/11.2.0/grid/cdata/RAC-scan/backup_20190716_130747.ocr

To change the backup of OCR to a dedicated directory

[oracle@RAC1 ~]$ ocrconfig -backuploc /home/oracle

To list the OCR and its mirror disks and to verify the integrity of each file

[oracle@RAC1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3732
         Available space (kbytes) :     258388
         ID                       : 2047356075
         Device/File Name         :       +EXT
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

To verify the integrity from all the nodes!

[oracle@RAC1 ~]$ cluvfy comp ocr -n all -verbose

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations

ASM Running check passed. ASM is running on all specified nodes

Checking OCR config file "/etc/oracle/ocr.loc"...

OCR config file "/etc/oracle/ocr.loc" check successful

Disk group for ocr location "+EXT" available on all the nodes

This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user to verify the contents of OCR.

OCR integrity check passed

Verification of OCR integrity was successful.

To take manual backup of OCR

[oracle@RAC1 ~]$ ocrdump <filename>

Sometimes there can be situations to take manual backups of OCR though it is automatic!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s