Wednesday, April 21, 2010

Oracle Cluster Registry (OCR) in an Oracle Cluster environment.

The Oracle Cluster Registry(OCR) is one of the required components in an Oracle Cluster environment. The most each way to position the OCR is like the windows registry. It is a registry which contains all the information about the cluster environment. You need to think of node names, ip addresses, an application resources like listener,vip, gsd but also the databases/instance. Also the parameters like need to startup, dependencies are stored in the OCR. The OCR is created during the CRS installation when the root.sh script is executed. When root.sh is executed it will read the ocr.loc file which is create during installation and pointing the the OCR file/device. To make sure all the nodes in the cluster can read the OCR the ocr location must be on shared storage.

The location of the ocr.loc depended on the platform used.

Linux: /etc/oracle/ocr.loc

Aix: /etc/oracle/ocr.loc

Solaris : /var/opt/oracle

Windows : HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\OCR

If we look in the ocr.loc file we see the following.

ocrconfig_log=/dev/raw/ocr1

ocrmirrorconfig_loc=/dev/raw/ocr2

local_only=FALSE

The value of local_only = true indicates "Single instance only" and false means using "RAC".

The orc.loc is the location where the CRS stack will check for the OCR during startup. When the OCR is found it will be read for the voting disk location and the other information. If for some reason the orc.loc or the location in the ocr.loc is not available the cluster will not be started. From oracle 10g release 2, it is possible to define more OCR locations (mirroring).

Clients of the OCR are srvctl, css, crs, dbua, vipca and em.

Tools which can be used:

ocrconfig - configuration tool for Oracle Cluster Registry

ocrdump – utility to dump the contents of the OCR in a file.

ocrcheck – utility to verify the OCR integrity.

No comments:

Post a Comment