OCR的操作

OCR的操作基本都需要root用户
ORACLE建议将OCR默认自动备份位置改变到RAC共享存储上,
OCR默认自动备份位置:node1的$ORACLE_BASE/crs/cdata/crsname
改变自动备份位置:
# ocrconfig -backuploc
物理备份OCR:
# ocrdump -backupfile
PROT-302: Failed to initialize ocrdump
metalink对这个问题的解释如下:
Cause:
The command "ocrdump -backupfile filename" fails to dump the content of the specified backup file if the backup file is not placed on an OCR-compatible device, which can be used to configure as an OCR device.
This issue was reported in Bug 4966320, Bug 7421563, Bug 5893432, Bug 5654475, Bug 7698962 fixed via internal unpublished Bug 4870817
Solution:
This bug is known to have been fixed in latest CRS bundle patch for 10.2.0.4.  For more information, please consult Note 405820.1
物理恢复OCR:
# ocrconfig -restore /cdata/crsname/day.ocr
逻辑备份OCR:
# ocrconfig -export /shared/export/ocrback.dmp
逻辑恢复OCR:
# ocrconfig -import /shared/export/ocrback.dmp
验证OCR完整性(oracle用户执行):
$ cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR...
OCR of correct Version "2" exists.
Checking data integrity of OCR...
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful.
显示OCR和镜像配置:
# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262144
         Used space (kbytes)      :       3256
         Available space (kbytes) :     258888
         ID                       :  773639647
         Device/File Name         : /ocr/ocr.ora
                                    Device/File integrity check succeeded
                                    Device/File not configured
         Cluster registry integrity check succeeded
        
# ocrconfig -replace ocrmirror /ocr/ocrmirror.ora
PORT-21: Invalid parameter
用如下方法解决这个报错(linux):
# touch /ocr/ocrmirror.ora
# ocrconfig -replace ocrmirror /ocr/ocrmirror.ora(也可以通过vi /etc/oracle/ocr.loc完成)
# ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     262144
         Used space (kbytes)      :       3272
         Available space (kbytes) :     258872
         ID                       :  773639647
         Device/File Name         : /ocr/ocr.ora
                                    Device/File integrity check succeeded
         Device/File Name         : /ocr/ocrmirror.ora
                                    Device/File integrity check succeeded
         Cluster registry integrity check succeeded
到这里mirror ocr创建成功。
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17997/viewspace-607299/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/17997/viewspace-607299/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值