Saturday, 19 November 2011

Replace a Corrupt OCR Mirror File

$ ocrcheck


Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 130067

Used space (kbytes) : 3752

Available space (kbytes) : 126299

ID : 561894456

Device/File Name : /s104/app/oradata/ocr01_data

Device/File integrity check succeeded

Device/File Name : /s104/app/oradata/ocr02_data

Device/File integrity check succeeded

Cluster registry integrity check succeeded

2. Let me corrupt mirrored OCR for testing purpose:

$ dd if=/dev/zero of=/s104/app/oradata/ocr02_data bs=1024k

3. Now check the synchronization between two copies (OCR):

$ ocrcheck


Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 130067

Used space (kbytes) : 3752

Available space (kbytes) : 126299

ID : 561894456

Device/File Name : /s104/app/oradata/ocr01_data

Device/File integrity check succeeded

Device/File Name : /s104/app/oradata/ocr02_data

Device/File needs to be synchronized with the other device

4. Using ocrconfig with -replace ocrmirror option:

$ ocrconfig -replace ocrmirror /s104/app/oradata/ocr02_data

Now check for the OCR status:

$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 130067

Used space (kbytes) : 3752

Available space (kbytes) : 126299

ID : 561894456

Device/File Name : /s104/app/oradata/ocr01_data

Device/File integrity check succeeded

Device/File Name : /s104/app/oradata/ocr02_data

Device/File integrity check succeeded

Cluster registry integrity check succeeded

Now we have both OCR files in the correct state.

No comments:

Post a Comment