The Oracle Cluster Registry in RAC (OCR)

The Oracle Cluster Registry in RAC (OCR)

Oracle RAC Cluster Tips by Burleson Consulting


http://www.dba-oracle.com/real_application_clusters_rac_grid/ocr.htm


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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值