OCR的操作

byfree發表於2009-06-23
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章