Repair Option of the ocrconfig Command [ID 330234.1]

Source: Internet
Author: User
Repair Option of the ocrconfig Command [ID 330234.1] ocrconfig, CRS
Applies:
Oracle Server-Enterprise Edition-version: 10.2.0.1 to 10.2.0.4-release: 10.2 to 10.2
Information in this document applies to any platform.

Goal
Ocrconfig-repair is used to repair inconsistent Oracle cluster Registry ({
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> OCR) configuration information. The OCR configuration information is stored in:
-File/etc/Oracle/OCR. LOC on {
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> Linux and {
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> AIX;
-File/var/opt/Oracle/OCR. LOC on {
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> Solaris and HP-UX;

One case when the repair the OCR configuration information wocould be required, is in a cluster where the OCR configuration was changed on one node while other node (s) were down.

Please note that this command only modifies the OCR configuration information.
Solution
The problem with an inconsistent OCR configuration (OCR. loc file) on two node Linux cluster, will be demonstrated by shutting down node2. while that node is down, we wocould remove the OCR mirror file from node 1. please note that these commands need to be run by a privileged user.

1. We start with mirrored Oracle cluster Registry

Node1 # ocrcheck
Status of Oracle cluster registry is as follows:
Version: 2
Total Space (Kbytes): 200692
Used space (Kbytes): 3756
Available space (Kbytes): 196936
ID: 495185602
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Device/file integrity check succeeded
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Device/file integrity check succeeded

Cluster registry integrity check succeeded

2. Now we shut the node2 down and remove the mirror file oracleclusterregistry2 from node1:

Node1 # ocrconfig-replace ocrmirror

Node1 # ocrcheck
Status of Oracle cluster registry is as follows:
Version: 2
Total Space (Kbytes): 200692
Used space (Kbytes): 3752
Available space (Kbytes): 196940
ID: 495185602
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Device/file integrity check succeeded

Device/File Not Configured

Cluster registry integrity check succeeded
The contents of the OCR configuration file on node1, wocould now be:

Node1 # Cat/etc/Oracle/OCR. Loc
# Device/file/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2 being deleted
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Local_only = false
3. We now bring the node2 back up and check the OCR status:

Node2 # ocrcheck
PROT-602: failed to retrieve data from the cluster Registry
While the error makes sense, as the mirror copy of the OCR doesn't exist any more (but the reference to that file is still in OCR. loc), it is not telling us what the problem might be.

To debug this we might use strace (strace-f-o/tmp/ocrcheck. trcocrcheck) That wowould reveal an attempt to access non existent OCR mirror file. in this case we do know that the problem is indeed due to the missing OCR mirror file, so we can proceed with the repair of the OCR configuration on node 2:




Node2 # ocrconfig-repair OCR



Node2 # Cat/etc/Oracle/OCR. Loc
# Device/file/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry being deleted
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Local_only = false


3.1. because we did not specify the OCR file, that Command actually removed the original reference to the OCR file oracleclusterregistry and instead replaced it with the reference to the OCR mirror file oracleclusterregistry2. In effect we ended up with different contents of the config files (OCR. loc) on our {
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> RAC nodes.

On Node 1 OCR. Loc has:

Node1 # Cat OCR. Loc
# Device/file/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2 being deleted
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Local_only = false
And on node 2 we have:

Node2 # Cat/etc/Oracle/OCR. Loc
# Device/file/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry being deleted
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Local_only = false
3.2. to fix this, we need to run 'crconfig-repair 'on node2 again, this time specifying the correct OCR file:

Node2 # ocrconfig-repair OCR/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
PROT-19: cannot proceed while clusterware is running. Shutdown clusterware first
Try again




Node2 # crsctl stop CRS
Stopping resources.
Successfully stopped {
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> CRS Resources
Stopping cssd.
Shutting down CSS daemon.
Shutdown request successfully issued.





Node2 # ocrconfig-repair OCR/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry

Node2 # Cat/etc/Oracle/OCR. Loc
# Device/file/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2 getting replaced by device/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Local_only = false


4. Now we have the same OCR configuration information on both nodes:

Node2 # ocrcheck
Status of Oracle cluster registry is as follows:
Version: 2
Total Space (Kbytes): 200692
Used space (Kbytes): 3756
Available space (Kbytes): 196936
ID: 495185602
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Device/file integrity check succeeded

Device/File Not Configured
5. Finally, to mirror the OCR file, we run 'crconfig-replace ocrmirror 'from any node:

Node2 # ocrconfig-replace ocrmirror/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
And check for the configuration and OCR integrity:

Node2 # Cat/etc/Oracle/OCR. Loc
# Device/file getting replaced by device/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Ocrconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Ocrmirrorconfig_loc =/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Local_only = false

Node2 # ocrcheck
Status of Oracle cluster registry is as follows:
Version: 2
Total Space (Kbytes): 200692
Used space (Kbytes): 3756
Available space (Kbytes): 196936
ID: 495185602
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry
Device/file integrity check succeeded
Device/File Name:/ora10g/APP/Oracle/oradata/V10/oracleclusterregistry2
Device/file integrity check succeeded

Cluster registry integrity check succeeded
Conclusion

Ocrconfig-repair is used to repair inconsistent Oracle cluster registry configuration information.

Ocrconfig-replace ocrmirror <File> is used to mirror Oracle cluster registry. The processing ing functionality was introduced in oracle10gr2.

References
Oracle Database Oracle clusterware and Oracle Real Application Clusters administration and deployment guide 10g Release 2 (10.2)

Related

--------------------------------------------------------------------------------
Products
--------------------------------------------------------------------------------

• Oracle database products> Oracle Database> ORACLE Server-Enterprise Edition
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Function onclick ()
{
Tagshow (Event)
}
}
}
}
}
}
} "> Errors
--------------------------------------------------------------------------------
PROT-19 PROT-602

 

 

*********************************** *****

CSS (cluster synchronization services) Internals (internal only)

Ask some questions about some trace files of the cssd background daemon.

An error occurred while registering the RAC listener.

Crs_stat document

Resource permission in RAC

A glance at the problem

What does scls_scr do?

Manual reconstruction of CRS and Rac databases at Oracle10g

Upgrade CRS and run root102.sn successfully, but GSD cannot start

Rac crs cannot be started. Please take a look.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.