ORA-DB-ONE

Manage OCR(Oracle Cluster Repository)

Posted in 3766 by jackyoon on June 17, 2009

1. Backup

You must be logged in as the root user, because root owns the OCR files.

- To see the recent copy of OCR file

# ocrconfig -showbackup

export OCR file

# ocrconfig -export /oracle/backup/cluster/backup01.ocr -s online

2. Restore

import OCR file

If you should need to recover this file, the following command can be used.
# ocrconfig -import /oracle/backup/cluster/backup01.ocr

To see whether your OCR’s are in sync and healthy run an ocrcheck, which should return with “succeeded“, like below.

# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 280908
Used space (kbytes) : 4612
Available space (kbytes) : 276296
ID : 1065955458
Device/File Name : /dev/raw/ocr01.dat
Device/File integrity check succeeded
Device/File Name : /dev/raw/ocr02.dat
Device/File integrity check succeededCluster registry integrity check succeeded

Retore from your OCR backup

You system automatically backup the OCR periodically. So, you can just resotre if it you need to.

# ocrconfig -restore /home/app/oracle/product/crs/cdata/crs/backup02.ocr

3. Add or replace OCR files

If you setup only one OCR file during the RAC configuration and need to add additional mirrored file(s). You can apply same rule to convert OCR raw devices into OCR block devices.(Please refer metalink doc 428681.1 for OCR/Vote disk maintenance Operations)

* This command replaces your primary OCR file with /dev/cciss/ocr01.dat
# ocrconfig -replace ocr /dev/cciss/ocr01.dat

* This command replaces your mirrored OCR file with /dev/cciss/ocr02.dat
# ocrconfig -replace ocrmirror /dev/cciss/ocr02.dat

Leave a Reply