Tag Archives: check

Add, Replace, Repair, and Remove the Oracle Cluster Registry (OCR) commands

Add, Replace, Repair, and Remove the Oracle Cluster Registry (OCR) commands

Oracle Cluster Registry (OCR) stores Oracle Cluster-ware and RAC database configuration information.

Note:
1. If the original OCR location lost then then create an empty (0 byte) OCR location with permissions
then you run the ocrconfig -add or ocrconfig -replace commands.
2. OCR file, device, or disk group must be accessible from all of the active nodes
3. Oracle recommend to have three copy OCR location to prevent lose of one location failure.

Add the OCR location in existing Environment
Oracle support upto 5 OCR location

ocrconfig -add +asm_disk_group | file_name

Example:
-- In asm
ocrconfig -add +ASMOCR

-- In Filesystem
ocrconfig -add /dev/ocr

Remove an Oracle Cluster Registry Location
For remove one OCR location must be available or online.

ocrconfig -delete +ASM_disk_group | file_name

Replace an Oracle Cluster Registry Location
Note: You need atleast two OCR location online before start replace operation.

1. Check all the OCR is available or online so that other OCR must be available online before replace start.
ocrcheck

2. Check the Oracle clusterware is must running on node inwhich we are performing the replace OCR.
crsctl check crs

3. Replace the current location to destination location
ocrconfig -replace current_OCR_location -replacement new_OCR_location
Note: Command fails if you have less than two configured OCR locations are online.

Repair an Oracle Cluster Registry on a Local Node
Note: cannot repair the OCR configuration on a node on which the Oracle Cluster Ready Services daemon is running.
Suppose if node is shutdown for longtime of RAC system then you update the OCR configuration of that node before started.

ocrconfig -repair -replace current_OCR_location -replacement target_OCR_location

Advertisements