oracle 11g GRID 中 关于 OLR 需要知道的一些内容

来源:互联网 发布:数控下料机编程 编辑:程序博客网 时间:2024/05/17 02:00

oracle 11g GRID 中 关于 OLR 需要知道的一些内容

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


这里需要注意下 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.

aibang.com/show/293725186-420492730/product/15408209.html
aibang.com/show/293725186-420492730/product/15408237.html
aibang.com/show/293725186-420492730/product/15408263.html
aibang.com/show/293725186-420492730/product/15408281.html
aibang.com/show/293725186-420492730/product/15408451.html
aibang.com/show/293725186-420492730/product/15408537.html
aibang.com/show/293725186-420492730/product/15408617.html
aibang.com/show/293725186-420492730/product/15408631.html
aibang.com/show/293725186-420492730/product/15408669.html
aibang.com/show/293725186-420492730/product/15408699.html
aibang.com/show/293725186-420492730/product/15408719.html
aibang.com/show/293725186-420492730/product/15408817.html
aibang.com/show/293725186-420492730/product/15408861.html
aibang.com/show/293725186-420492730/product/15408907.html
aibang.com/show/293725186-420492730/product/15408933.html
aibang.com/show/293725186-420492730/product/15408969.html
aibang.com/show/293725186-420492730/product/15408987.html
aibang.com/show/293725186-420492730/product/15409009.html
aibang.com/show/293725186-420492730/product/15409031.html
aibang.com/show/293725186-420492730/product/15409261.html
aibang.com/show/293725186-420492730/product/15409299.html
aibang.com/show/293725186-420492730/product/15409323.html
aibang.com/show/293725186-420492730/product/15409375.html
aibang.com/show/293725186-420492730/product/15409409.html
aibang.com/show/293725186-420492730/product/15409449.html
aibang.com/show/293725186-420492730/product/15409483.html
aibang.com/show/293725186-420492730/product/15409493.html
aibang.com/show/293725186-420492730/product/15409713.html
aibang.com/show/293725186-420492730/product/15409997.html
aibang.com/show/293725186-420492730/product/15410017.html
aibang.com/show/293725186-420492730/product/15410033.html
aibang.com/show/293725186-420492730/product/15410059.html
aibang.com/show/293725186-420492730/product/15410077.html
aibang.com/show/293725186-420492730/product/15410097.html
aibang.com/show/293725186-420492730/product/15410111.html
aibang.com/show/293725186-420492730/product/15410129.html
aibang.com/show/293725186-420492730/product/15410145.html
aibang.com/show/293725186-420492730/product/15410165.html
aibang.com/show/293725186-420492730/product/15410179.html
aibang.com/show/293725186-420492730/product/15410201.html
aibang.com/show/293725186-420492730/product/15410213.html
aibang.com/show/293725186-420492730/product/15410243.html
aibang.com/show/293725186-420492730/product/15410259.html
aibang.com/show/293725186-420492730/product/15410313.html
aibang.com/show/293725186-420492730/product/15410331.html
aibang.com/show/293725186-420492730/product/15410341.html
aibang.com/show/293725186-420492730/product/15410361.html
aibang.com/show/293725186-420492730/product/15410389.html
aibang.com/show/293725186-420492730/product/15410397.html
aibang.com/show/293725186-420492730/product/15410415.html

0 0