OLR (Oracle Local Registry) in RAC

In this paragraph OLR (Oracle Local Registry) in RAC contains node-specific information required by OHASD. Every node has its own dedicated OLR file (not shared between the nodes). From Oracle Clusterware 11g Release 2 onwards an additional component related to the OCR called the Oracle Local Registry (OLR) is installed on each node in the cluster. The OLR is a local registry for node specific resources. The OLR is not shared by other nodes in the cluster. It is installed and configured when Oracle clusterware is installed.

As OCRs files are present in ASM diskgroup, While starting the CRS, it wont be able to Access OCR file to find the cluster resource information. Because at this point ASM instance would also be down. So at this point OLR file ( which is present at normal file system) is accessed to start the required resources.

Some useful commands about OLR file in RAC:

The default location of Oracle Local Registry:

$GRID_HOME/cdata/*olr

To check the available backups of OLR:

[oracle@primary ~]$ /u02/app/grid/product/19c/gridhome_1/bin/ocrconfig -local -showbackup

primary     2023/07/01 23:56:41     /u02/app/grid/crsdata/primary/olr/autobackup_20230701_235641.olr     724960844

primary     2023/06/23 21:42:11     /u02/app/grid/crsdata/primary/olr/autobackup_20230623_214211.olr     724960844

primary     2023/06/22 02:03:55     /u02/app/grid/crsdata/primary/olr/backup_20230622_020355.olr     724960844
[oracle@primary ~]$

To take the backup of OLR manually:

You required to login as root user for take OLR manual backup.

[root@primary ~]# /u02/app/grid/product/19c/gridhome_1/bin/ocrconfig -local -manualbackup

primary     2023/07/02 00:14:33     /u02/app/grid/crsdata/primary/olr/backup_20230702_001433.olr     724960844

primary     2023/06/22 02:03:55     /u02/app/grid/crsdata/primary/olr/backup_20230622_020355.olr     724960844
[root@primary ~]#

Verify integrity of the OLR:

[oracle@primary ~]$ cluvfy comp olr

Verifying OLR Integrity ...PASSED

Verification of OLR integrity was successful.

CVU operation performed:      OLR integrity
Date:                         Jul 2, 2023 12:15:50 AM
CVU home:                     /u02/app/grid/product/19c/gridhome_1/
User:                         oracle
[oracle@primary ~]$

Check the current OLR location using below command:

[oracle@primary ~]$ ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     491684
         Used space (kbytes)      :      83536
         Available space (kbytes) :     408148
         ID                       : 2016115297
         Device/File Name         : /u02/app/grid/crsdata/primary/olr/primary_19.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check bypassed due to non-privileged user

[oracle@primary ~]$

View the OLR file in text format execute below command:

/u02/app/grid/product/19c/gridhome_1/bin/ocrdump -local -stdout

Restore OLR from backup:

[oracle@primary ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'primary'
CRS-2673: Attempting to stop 'ora.orcl.db' on 'primary'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'primary'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'primary' succeeded
CRS-2677: Stop of 'ora.orcl.db' on 'primary' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'primary'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'primary'
CRS-2673: Attempting to stop 'ora.RECO.dg' on 'primary'
CRS-2677: Stop of 'ora.RECO.dg' on 'primary' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'primary' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'primary'
CRS-2677: Stop of 'ora.evmd' on 'primary' succeeded
CRS-2677: Stop of 'ora.asm' on 'primary' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'primary'
CRS-2677: Stop of 'ora.cssd' on 'primary' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'primary' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[oracle@primary ~]$
[oracle@primary ~]$
[oracle@primary ~]$ ocrconfig -local
CRS-8503: Oracle Clusterware process OCRCONFIG with operating system process ID 16590 experienced fatal signal or exception code 11.
Aborted (core dumped)
[oracle@primary ~]$
[oracle@primary ~]$ ocrconfig -local
[oracle@primary ~]$ 
[oracle@primary ~]$ crsctl start has -wait
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: primary
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'primary'
CRS-2672: Attempting to start 'ora.evmd' on 'primary'
CRS-2676: Start of 'ora.evmd' on 'primary' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'primary' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'primary'
CRS-2672: Attempting to start 'ora.diskmon' on 'primary'
CRS-2676: Start of 'ora.diskmon' on 'primary' succeeded
CRS-2676: Start of 'ora.cssd' on 'primary' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'primary'
CRS-2676: Start of 'ora.asm' on 'primary' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'primary'
CRS-2676: Start of 'ora.DATA.dg' on 'primary' succeeded
CRS-2672: Attempting to start 'ora.RECO.dg' on 'primary'
CRS-2676: Start of 'ora.RECO.dg' on 'primary' succeeded
CRS-2672: Attempting to start 'ora.orcl.db' on 'primary'
CRS-2676: Start of 'ora.orcl.db' on 'primary' succeeded
CRS-6016: Resource auto-start has completed for server primary
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
[oracle@primary ~]$

install grid infrastructure for standalone server in oracle 19c

I hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com.
Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You can write to mail me through : orakldba@gmail.com.

Leave a Comment