Oracle Local Registry (OLR) – 11gR2

From 11gR2 Oracle introduced “Oracle Local Registry(OLR)”, something new as part of Oracle Clusterware.OLR is node’s local repository,similar to OCR (but local) and is managed by OHASD.It pertains data of local node only and is not shared among other nodes.On a linux environment the configuration file is placed in /etc/oracle location.

$ pwd
$ ls -lrt olr*
-rw-r--r--  1 root dba 96 Feb 24 07:34 olr.loc

The olr.loc file consist of the OLR config file location and the crs_home location.

$ cat olr.loc

So, by default the location is , olrconfig_loc =<GRID_HOME>/cdata/<hostname>.olr.

To check the location using command (as oracle user):-

$ ocrcheck -local -config
Oracle Local Registry configuration is :
         Device/File Name         : /u01/app/oracle/grid/11.2.0/cdata/<hostname>.olr

To get more information on it, you need to use “ocrcheck -local”, which must be run as root user.If run as Oracle user, we get [Permission denied] error

[root@nn4040 bin]# ./ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2552
         Available space (kbytes) :     259568
         ID                       : 1311683887
         Device/File Name         : /u01/app/oracle/grid/11.2.0/cdata/<hostname>.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check succeeded

The OLR can be dumped in a similar way the OCR is dumped

$ ocrdump -h
ocrdump – Dump contents of Oracle Cluster/Local Registry to a file.

ocrdump [-local] [|-stdout] [-backupfile ] [-keyname ] [-xml] [-noheader]

$ ocrdump -local olr.lst   --> Normal Text Format
$ ocrdump -local -xml olr_xml.lst  --> XML format

The OLR dump shows that it contains data about ORA_CRS_HOME,localhost verion, activeversion,GPnP details,OCR latest backup time and location,information about OCR daily, weekly backup location and node name etc.This formation stored in the OLR is needed by OHASD to start or join a cluster.When the crs is started using crsctl start crs command , the alert<hostname>.log in GRID_HOME/log/<hostname>/ shows –

[ohasd(10303)]CRS-2112:The OLR service started on node nn4040.
2011-03-10 02:01:48.443
[ohasd(10303)]CRS-1301:Oracle High Availability Service started on node nn4040.
2011-03-10 02:01:48.458

Few other administrative commands –

To import a specified file to OLR:

# ocrconfig –local –import file_name

To manually back up OLR:

# ocrconfig –local –manualbackup

To view the contents of the OLR backup file:

ocrdump -local -backupfile olr_backup_file_name

To change the OLR backup location:

ocrconfig -local -backuploc new_olr_backup_path

To restore OLR:

# crsctl stop crs
# ocrconfig -local -restore file_name
# ocrcheck -local
# crsctl start crs
$ cluvfy comp olr

Reference –

4 thoughts on “Oracle Local Registry (OLR) – 11gR2

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s