oracle 11g GRID中OLR知識

來源:互聯網
上載者:User

1.檢查olr 的狀態:

[root@vmrac1 ~]# ocrcheck -local

Status of Oracle Local Registry is as follows :

        Version                  :          3

        Total space (kbytes)     :     262120

        Used space (kbytes)      :       2748

        Available space (kbytes) :     259372

        ID                       :  935756415

        Device/File Name         : /u02/app/11.2.0.3/grid/cdata/vmrac1.olr

                                   Device/File integrity check succeeded

        Local registry integrity check succeeded

        Logical corruption check succeeded

2.將olr的內容轉儲到txt 文檔,可查看olr的內容:

# ocrdump -local -stdout

3.匯出/匯入 olr 的內容:

--- 匯出 OLR

# ocrconfig –local –export file_name

/*file_name 為匯入檔案,匯出的檔案名稱,這個檔案名稱是自定的 eg:olr_myhost1_20090603_0130_export */

--- 匯入 OLR:

# ocrconfig –local –import file_name

/*file_name 為匯入檔案,匯出的檔案名稱,這個檔案名稱是自定的 eg:olr_myhost1_20090603_0130_export */

note:

》 Oracle recommends that you use the -manualbackup and -restorecommands and not the -importand -exportcommands.

》 When exporting OLR, Oracle recommends including "olr", the host name, and the timestamp in the name string.

For example:olr_myhost1_20090603_0130_export

4.手動備份OLR:

# ocrconfig –local –manualbackup

olr 會在grid 安裝完成後,或者升級後備份一次。之後就不會自動備份 。oracle 建議在對 ocr 儲存遷移後對OLR 進行手動備份一次。

**OLR預設備份目錄:Grid_home/cdata/host_name.

----修改OLR 備份目錄:

ocrconfig -local -backuploc new_olr_backup_path

----查看olr 備份檔案內容:

ocrdump -local -backupfile olr_backup_file_name

本欄目更多精彩內容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

這裡需要注意下 olr:ocrconfig  -manualbackup 和 ocrconfig -local -restore 是配套使用的,ocrconfig -local -export 和 ocrconfig -local -import 是配套使用的,也就是說 ocrconfig -local -export  file_name 匯出的檔案不用用作 ocrconfig -local -restore 使用

5.還原OLR:

To restore OLR:

----停crs

# crsctl stop crs

----恢複OLR:

# ocrconfig -local -restore file_name    /*file_name為olr的備份路徑中的檔案名稱,可以通過 ocrconfig -local -showbackup 來查看*/

-----確認olr 的狀態(檢查olr 內容的邏輯完整性):

# ocrcheck -local

----重啟crs

# crsctl start crs

----使用cvu驗證olr 在叢集中的完整性(注意:不檢查olr 內容的邏輯完整性)

$ cluvfy comp olr

grid@vmrac1 ~]$ cluvfy comp olr

Verifying OLR integrity

Checking OLR integrity...

Checking OLR config file...

OLR config file check successful

Checking OLR file attributes...

OLR file check successful

WARNING:

This check does not verify the integrity of the OLR contents. Execute 'ocrcheck -local' as a privileged user to verify the

contents of OLR.

OLR integrity check passed

Verification of OLR integrity was successful.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.