Management and Maintenance of Oracle RAC OCR

Source: Internet
Author: User

OCR is equivalent to the Windows registry. For Windows, all software information, users, configurations, and security are stored in the registry. In the same way, all cluster-related resources, configurations, nodes, and RAC databases are stored in this warehouse. If OCR is damaged, the cluster Service Startup exception occurs. You need to fix OCR. Therefore, OCR management and maintenance are very important for the entire cluster. This document describes the OCR management and maintenance for Oracle 10g RAC.

OCR reference:

Oracle rac ocr and amnesia

Oracle rac ocr backup and recovery

1. Environment
Oracle @ bo2dbp: ~> Cat/etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64)-Kernel \ r (\ l ).
 
Oracle @ bo2dbp: ~> Crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.3.0]

2. Check the OCR File
Oracle @ bo2dbp: ~> Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version: 2
Total space (kbytes): 204560
Used space (kbytes): 6160
Available space (kbytes): 198400
ID: 1512159503
Device/File Name:/dev/raw/raw1 <-- OCR (primary)
Device/File integrity check succeeded
 
Device/File not configured <-- OCR Mirror (not configured)
 
Cluster registry integrity check succeeded
 
# If clusterware is disabled, You can query ocr. loc to obtain the location of the ocr file.
Oracle @ bo2dbp: ~> More/etc/oracle/ocr. loc
Ocrconfig_loc =/dev/raw/raw1
Local_only = FALSE
 
# Verifying log files generated by OCR
$ ORA_CRS_HOME/log/

3. dump OCR content
# By default, the export file of the ocrdump command is named ocrdumpfile and its file type is ASCII. If the default file already exists, you will receive a message indicating that the PROT-303 file exists.
 
# Export ocr to the default file
Oracle @ bo2dbp: ~> Ocrdump
Oracle @ bo2dbp: ~> Ls-hltr OCRDUMPFILE
-Rw-r -- 1 oracle oinstall 44 K 2013-01-07 OCRDUMPFILE
Oracle @ bo2dbp: ~> File OCRDUMPFILE
OCRDUMPFILE: ASCII text
 
# Export ocr to a specified file
Oracle @ bo2dbp: ~> Ocrdump/tmp/'hostname' _ ocrdump _ 'date + % Y % m % d: % H % m'
Oracle @ bo2dbp: ~> Ls/tmp/* ocr *
/Tmp/bo2dbp_ocrdump_20130107: 1415
 
Export the contents of system.css in ocr.
Oracle @ bo2dbp: ~> Ocrdump-stdout-keyname SYSTEM.css-xml> ocrdump. xml
Oracle @ bo2dbp: ~> More ocrdump. xml
<OCRDUMP>
 
<TIMESTAMP> 01/07/2013 14:15:42 </TIMESTAMP>
<COMMAND>/u01/oracle/crs/bin/ocrdump. bin-stdout-keyname SYSTEM.css-xml </COMMAND>
 
<KEY>
<NAME> SYSTEM.css </NAME>
<VALUE_TYPE> UNDEF </VALUE_TYPE>
<VALUE> <! [CDATA []> </VALUE>
<USER_PERMISSION> PROCR_ALL_ACCESS </USER_PERMISSION>
<GROUP_PERMISSION> PROCR_READ </GROUP_PERMISSION>
<OTHER_PERMISSION> PROCR_READ </OTHER_PERMISSION>
<USER_NAME> root </USER_NAME>
<GROUP_NAME> root </GROUP_NAME>
............
 
# Export ocr backup information in ocr
Oracle @ bo2dbp: ~> Ocrdump-stdout-keyname SYSTEM. OCR-xml> ocrdump_bak.xml

4. Add an OCR File
# Note: In the following description, crs is online on all nodes, that is, adding and moving ocr. Instead of crs, crs does not need to be offline.
Oracle @ bo2dbp: ~> Crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
Oracle @ bo2dbp: ~> Ssh bo2dbs crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
 
Ocrconfig-replace ocrmirror <destination_file>
Ocrconfig-replace ocrmirror <disk>
 
Oracle @ bo2dbp: ~> Sudo-s rcraw status
Root's password:
/Dev/raw/raw1: bound to major 8, minor 33
/Dev/raw/raw2: bound to major 8, minor 49
/Dev/raw/raw11: bound to major 8, minor 113
/Dev/raw/raw21: bound to major 8, minor 129
/Dev/raw/raw22: bound to major 8, minor 145
Running
 
Oracle @ bo2dbp: ~> Sudo-s/u01/oracle/crs/bin/ocrconfig-replace ocrmirror/dev/raw/raw11
Root's password:
Oracle @ bo2dbp: ~> Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version: 2
Total space (kbytes): 204560
Used space (kbytes): 6184
Available space (kbytes): 198376
ID: 1512159503
Device/File Name:/dev/raw/raw1
Device/File integrity check succeeded
Device/File Name:/dev/raw/raw11 # The New ocr image has been added.
Device/File integrity check succeeded
 
Cluster registry integrity check succeeded
 
# Connect to the second node to view
Oracle @ bo2dbp: ~> Ssh bo2dbp ocrcheck
Status of Oracle Cluster Registry is as follows:
Version: 2
Total space (kbytes): 204560
Used space (kbytes): 6184
Available space (kbytes): 198376
ID: 1512159503
Device/File Name:/dev/raw/raw1
Device/File integrity check succeeded
Device/File Name:/dev/raw/raw11 # The New ocr image has been added.
Device/File integrity check succeeded
 
Cluster registry integrity check succeeded
 
# Check whether the ocr position of the ocr. loc file is changed from two nodes
Oracle @ bo2dbp: ~> More/etc/oracle/ocr. loc
# Device/file getting replaced by device/dev/raw/raw11
Ocrconfig_loc =/dev/raw/raw1
Ocr1_config_loc =/dev/raw/raw11 # The ocrmirror location is added.
Local_only = false
 
Oracle @ bo2dbp: ~> Ssh bo2dbs cat/etc/oracle/ocr. loc
# Device/file getting replaced by device/dev/raw/raw11
Ocrconfig_loc =/dev/raw/raw1
Ocrw.config_loc =/dev/raw/raw11
 
# Next we will try to add one more ocrmirror. We will use the image with the raw device raw21 as the image.
Oracle @ bo2dbp: ~> Sudo-s/u01/oracle/crs/bin/ocrconfig-replace ocrmirror/dev/raw/raw21
Root's password:
Oracle @ bo2dbp: ~> Ocrcheck
Status of Oracle Cluster Registry is as follows:
Version: 2
Total space (kbytes): 204560
Used space (kbytes): 6184
Available space (kbytes): 198376
ID: 1512159503
Device/File Name:/dev/raw/raw1
Device/File integrity check succeeded
Device/File Name:/dev/raw/raw21 # You can see that the original raw11 has been replaced
Device/File integrity check succeeded
 
Cluster registry integrity check succeeded
 
# As described above, there can be only two ocr disks, one as primary and the other as mirror.

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.