OCR corresponds to the registry of Windows. For Windows, all software information, users, configuration, security, and so on are all in the registry. And the cluster, again, all cluster-related resources, configurations, nodes, and RAC databases are all in this warehouse. If OCR is corrupted, the Cluster service initiates an exception and needs to fix OCR. Therefore, the management and maintenance of OCR is very important for the whole cluster. This paper mainly describes the management and maintenance of OCR under Oracle 10g RAC.
[Python] View plaincopyprint?
1. Environment
Oracle@bo2dbp:~> cat/etc/issue
Welcome to SUSE Linux Enterprise Server SP3 (x86_64)-Kernel \ R (\l).
oracle@bo2dbp:~> crsctl Query CRS Activeversion
CRS Active version on the cluster is [10.2.0.3.0]
2. Verify OCR Files
Oracle@bo2dbp:~> Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version:2
Total Space (Kbytes): 204560
Used Space (Kbytes): 6160
Available Space (Kbytes): 198400
id:1512159503
Device/file Name:/dev/raw/raw1 <--OCR (primary)
Device/file Integrity Check Succeeded
Device/file Not Configured <--OCR Mirror (not configured)
Cluster Registry Integrity Check succeeded
#如果clusterware处于关闭状态也可通过查询ocr. Loc get the location of the OCR file
Oracle@bo2dbp:~> More/etc/oracle/ocr.loc
Ocrconfig_loc=/dev/raw/raw1
Local_only=false
#校验OCR产生的日志文件
$ORA _crs_home/log/
3, the content of dump OCR
#缺省情况下, the ocrdump command export file is named Ocrdumpfile, its file type is an ASCII file, and the PROT-303 file is prompted if the default file already exists
#导出ocr到缺省文件
Oracle@bo2dbp:~> Ocrdump
Oracle@bo2dbp:~> ls-hltr Ocrdumpfile
-rw-r--r--1 Oracle oinstall 44K 2013-01-07 14:13 ocrdumpfile
oracle@bo2dbp:~> file Ocrdumpfile
Ocrdumpfile:ascii text
#导出ocr到指定文件
oracle@bo2dbp:~> ocrdump/tmp/' hostname ' _ocrdump_ ' date +%y%m%d:%h%m '
Oracle@bo2dbp:~> ls/tmp/*ocr*
/tmp/bo2dbp_ocrdump_20130107:1415
#导出ocr中system the contents of a. CSS Item
oracle@bo2dbp:~> ocrdump-stdout-keyname System.css-xml >ocrdump.xml
oracle@bo2dbp:~> more Ocrdump.xml
<OCRDUMP>
<timestamp>01/07/2013 14:15:42</timestamp>
<command>/u01/oracle/crs/bin/ocrdump.bin-stdout-keyname System.css-xml </COMMAND>
<KEY>
<NAME>SYSTEM.css</NAME>
<VALUE_TYPE>UNDEF</VALUE_TYPE>
<value><! [cdata[]]></value>
<USER_PERMISSION>PROCR_ALL_ACCESS</USER_PERMISSION>
<GROUP_PERMISSION>PROCR_READ</GROUP_PERMISSION>
<OTHER_PERMISSION>PROCR_READ</OTHER_PERMISSION>
<USER_NAME>root</USER_NAME>
<GROUP_NAME>root</GROUP_NAME>
............
#导出ocr中关于ocr的备份情况
Oracle@bo2dbp:~> ocrdump-stdout-keyname SYSTEM. Ocr-xml>ocrdump_bak.xml