The purpose of the Oracle
Cluster Registry (OCR) is to hold cluster and database configuration
information for RAC and Cluster Ready Services (CRS) such as the
cluster node list, and cluster database instance to node mapping,
and CRS application resource profiles.
There are two methods of copying
OCR content and using the content for recovery. The first method
uses automatically generated physical OCR file copies and the second
method uses manually created logical OCR export files.
Management of the Oracle
Cluster Registry Backup Files in Real Application Clusters
The CRS are managed by a CRS
instance. There will be one CRS instance for each node in a RAC
cluster. In a cluster, CRS instance automatically creates an OCR
backup every four hours. At any one time, the last three backup
copies are automatically retained. The CRS instance also creates and
retains an OCR backup for each full day and at the end of each week.
The backup frequencies or the number of files that Oracle will
retain cannot be customized as they are completely controlled by the
CRS instance.
Because of the importance of OCR
information, the ocrconfig tool should be used to make daily copies
of the automatically generated backup files.
To make a backup, use the
ocrconfig tool with the showbackup option to identify the backup
files, and then copy each file to a location that is redundant to
the location of the original OCR backup file. This ensures that
there are at least two copies of each OCR backup file.
Oracle also recommends that the
OCR location reside on RAID arrays. If possible, use a backup
location that is shared by all nodes in the cluster. The default
target location of each OCR backup file is as follows where <cluster
name> is the name assigned to the cluster when CRS was installed:
<CRS Home>/cdata/<cluster
name>
This location can be changed by
using the following syntax:
ocrconfig -backuploc
<directory name>
Restoration of the OCR File
from the Automatically Generated OCR Backups
Before attempting to resolve any
configuration-related problems, retry the application that failed.
If the problem continues, then use one of the following
platform-specific procedures to restore the OCR configuration.
Procedure for Restoring the
Oracle Cluster Registry on UNIX-Based Systems
1. Stop the following OCR
daemons: CSSD, CRSD, EVMD, and the EVM logger. On Linux the init.crs
script located in the /etc/init.d directory is used to stop these
daemons, for example:
[root@aultlinux1 init.d]#/etc/init.d/init.crs stop
2. Shut down all the nodes in
the cluster and restart from one node in single-user mode.
3. Identify the recent backups
using the ocrconfig -showbackup command.
4. Execute the restore by
applying an OCR backup file identified in Step 3 with the ocrconfig
-restore <file name> command.
5. Restart the CRS, CSS, and EVM
daemons and resume operations in cluster mode. The daemons can be
restarted using the same script as in step one only use the start
option:
[root@aultlinux1 init.d]#/etc/init.d/init.crs start
Procedure for Restoring the
Oracle Cluster Registry on Windows-Based Systems
1. Shut down all but one node in
the RAC database.
2. Disable the following OCR
clients and stop them using the Service Control Panel:
* OracleClusterVolumeService,
* OracleCSService,
* OracleCRService, and the
* OracleEVMService.
3. Identify the recent backups
using the ocrconfig -showbackup command.
4. Execute the restore by
applying an OCR backup file identified in Step 3 with the ocrconfig
-restore <file name> command.
5. Start all the services that
were stopped in step 2. Restart all the instances and resume
operations in cluster mode.