The Cluster Registry is the “database the Grid Infrastructure maintains of the resources the Grid Infrastructure must administer and maintain. The GI automatically backs it up every four hours and keeps at least 3 backups. In this article, I will show how to view available OCR backups, manually backup the OCR, and view the content of the OCR.
To view the available backups, issue the ocrconfig command. It is located in the Grid Infrastructure Home.
[oracle@rac1 ~]$ env |grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=rac1.localdomain
ORACLE_TERM=xterm
ORACLE_HOME=/u01/app/11.2.0.4/grid
|
[oracle@rac1 ~]$ which ocrconfig
/u01/app/11.2.0.4/grid/bin/ocrconfig
|
List OCR backups:
[oracle@rac1 ~]$ ocrconfig -showbackup
PROT-24: Auto backups for the Oracle Cluster Registry are not available
rac2 2014/11/03 18:16:30 /u01/app/11.2.0.4/grid/cdata/scan/backup_20141103_181630.ocr
|
Take manual backup of OCR:
[root@rac1 ~]# /u01/app/11.2.0.4/grid/bin/ocrconfig -manualbackup
rac2 2014/11/03 18:20:16 /u01/app/11.2.0.4/grid/cdata/scan/backup_20141103_182016.ocr
|
Check the state of the OCR:
[root@rac1 ~]# /u01/app/11.2.0.4/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3036
Available space (kbytes) : 259084
ID : 1365189787
Device/File Name : +DATA
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
|
It appears to be fine. If the message “Device/File integrity check succeeded” did not appear, you would need to restore OCR from a backed up copy.
What exactly is in the OCR? You can determine this by the ocrdump command:
[oracle@rac1 ~]$ ocrdump -local -stdout|more
11/03/2014 18:28:25
/u01/app/11.2.0.4/grid/bin/ocrdump.bin -local -stdout
[SYSTEM]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.crs]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.crs.usersecurity]
ORATEXT : 1
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.crs.deny]
ORATEXT :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.crs.user_default_dir]
ORATEXT : /u01/app/11.2.0.4/grid/ohasd/public
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.ORA_CRS_HOME]
ORATEXT : /u01/app/11.2.0.4/grid
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
[SYSTEM.WALLET]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_CREATE_SUB_KEY, OTHER_PERMISSION : PROCR_CREATE_SUB_KEY, USER_NAME : root, GROUP_NAME : roo
t}
[SYSTEM.GNS]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, GROUP_NAME : root}
|
I hope this helps.
Please feel free to leave your questions or suggest improvements to this section.
No comments:
Post a Comment