11gR2 OCRDUMP查看OCR/OLR文件的内容

       
        下面讨论有关11gR2 OCRDUMP命令的使用。首先获取OCRDUMP的帮助信息:
[root@rhel1 bin]# ./ocrdump -h
Name:
        ocrdump - Dump contents of Oracle Cluster/Local Registry to a file.

Synopsis:
        ocrdump [-local] [|-stdout] [-backupfile ] [-keyname ] [-xml] [-noheader]

Description:
        Default filename is OCRDUMPFILE. Examples are:

        prompt> ocrdump
        writes cluster registry contents to OCRDUMPFILE in the current directory

        prompt> ocrdump MYFILE
        writes cluster registry contents to MYFILE in the current directory

        prompt> ocrdump -stdout -keyname SYSTEM
        writes the subtree of SYSTEM in the cluster registry to stdout

        prompt> ocrdump -local -stdout -xml
        writes local registry contents to stdout in xml format

        prompt> ocrdump -backupfile /oracle/CRSHOME/backup.ocr -stdout -xml
        writes registry contents in the backup file to stdout in xml format

Notes:
        The header information will be retrieved based on best effort basis.
        A log file will be created in
        $ORACLE_HOME/log//client/ocrdump_.log. Make sure
        you have file creation privileges in the above directory before
        running this tool.
        Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.

        OCRDUMP工具允许DUMP OCR或者OLR的内容到文件或者标准输出,基于诊断和管理目的读取其中的内容,OCRDUMP的参数包括:
-stdout – 将输出的内容传送到终端。
-local – 指定该参数输出的是OLR的内容。
-Backupfile – 查看OCR/OLR备份文件的内容,参数后面要跟上参数文件名称。
-keyname – DUMP一个指定的OCR键(OCRDUMP的内容是以键值对存在)。
-xml – DUMP以XML格式输出。
-noheader – 在输出中不打印出头信息。

        当执行OCRDUMP操作的时候会创建一个日志文件,这个日志文件的存储位置是$GRID_HOME/log//client/ocrdump_.log,可以对输出的日志级别进行调整,可以通过编辑ocrlog.ini文件来修改日志级别。如果在执行OCRDUMP的时候报错,可以根据生成的日志文件来判断错误原因。

        OCR是以树形结构在OCR文件中存储数据,数据的存储形式是键值对。通过对OCRDUMP文件的分析,可以发现它的大体结构如下:
root
├─SYSTEM
│  ├─css
│  ├─language
│  ├─version
│  ├─ORA_CRS_HOME
│  ├─local_only
│  ├─evm
│  ├─crs
│  └─OCR
├─DATABASE
│  ├─NODEAPPS
│  ├─LOG
│  ├─ASM
│  ├─DATABASES
│  │  ├─SERVICE
│  │  └─INSTANCE
│  └─ONS
└─CRS

简单对上述三类键值的功能做下述简要描述:
1)SYSTEM键包含了与Oracle Clusterware主要进程CSSD、CRSD和EVMD的相关数据;
2)DATABASE键包含了在Oracle Clusterware注册的RAC数据库相关的数据;
3)OCR键记录了与资源概要文件相关的信息,维护其他注册到Oracle Clusterware的应用程序的可用性。

参考资料:
http://space.itpub.net/519536/viewspace-678008
http://www.toadworld.com/KNOWLEDGE/KnowledgeXpertforOracle/tabid/648/TopicID/RACR2MAN3/Default.aspx

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

转载于:http://blog.itpub.net/23135684/viewspace-715989/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值