Dump the contents of OCR and count the number of lines. If you dump the OCR as root, you will see more information than grid/oracle user because information in the OCR is organized by keys that are associated with privileges. See examples below:
As oracle or grid user:
ocrdump -stdout | wc -l
489
As root:
ocrdump -stdout | wc -l
2993
To dump the OCR content using XML format for the first 50 lines
ocrdump -stdout -xml | head -50
To dump current ocr
ocrdump -xml /apps/oracle/dump_current_ocr.xml
Dump the backup contents of a OCR in XML format, then compare it with the current OCR to detect any changes..
ocrconfig -showbackup
si01.an.com 2010/11/17 11:40:39 /dba/backup00.ocr
si01.an.com 2010/11/17 07:40:37 /dba/backup01.ocr
si01.an.com 2010/11/17 03:40:35 /dba/backup02.ocr
si01.an.com 2010/11/16 03:40:27 /dba/day.ocr
ocrdump -xml -backupfile /dba/day.ocr previous_day.ocr
Compare:
diff dump_current_ocr.xml previous_day.ocr
3,4c3,5
< <TIMESTAMP>11/17/2011 13:57:05</TIMESTAMP>
< <COMMAND>/apps/oracle/product/11.2.0.2/grid/bin/ocrdump.bin -xml /apps/oracle/dump_current_ocr.xml </COMMAND>
---
> <TIMESTAMP>11/17/2011 14:00:46</TIMESTAMP>
> <DEVICE>/dba/day.ocr</DEVICE>
> <COMMAND>/apps/oracle/product/11.2.0.2/grid/bin/ocrdump.bin -xml -backupfile /dba/day.ocr previous_day.ocr </COMMAND>
879c880
< <VALUE><![CDATA[83]]></VALUE>
---
> <VALUE><![CDATA[75]]></VALUE>
No comments:
Post a Comment