Forgot your password?    
+ Reply to Thread
Results 1 to 3 of 3

Thread: Restore and Recover OCR from Backup in Oracle RAC

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    Restore and Recover OCR from Backup in Oracle RAC

    Backup of OCR has been covered in How to Backup OCR

    Step 1: Locate physical the OCR backups using –showbackup command.
    #ocrconfig – showbackup

    Step 2: Review the contents
    #ocrdump –backupfile backup_file_name

    Step 3: Stop the Oracle clusterware on all the nodes.
    #crsctl stop crs

    Step 4: Restore the OCR backup
    # ocrconfig –restore $CRS_HOME/cdata/crs/day.ocr
    OR
    Restore the OCR from export/logical backup.
    # ocrconfig –import export_file_name
    For ex: - # ocrconfig –import /backup/oracle/exp_ocrbackup.dmp

    Step 5: Restart the Clusterware on all nodes.
    #crsctl start crs

    Step 6: Check the OCR integrity
    # cluvfy comp ocr –n all

  2. #2
    Oracle Administrator
    Join Date
    Apr 2012
    Posts
    53
    what is OCR?what does it contain?what is the use of it?

  3. #3
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Posts
    120
    The purpose of the Oracle Cluster Registry (OCR) is to hold cluster and database configuration information for RAC and Cluster Ready Services (CRS) such as the cluster node list, and cluster database instance to node mapping, and CRS application resource profiles.

    There are two methods of copying OCR content and using the content for recovery. The first method uses automatically generated physical OCR file copies and the second method uses manually created logical OCR export files.

    Management of the Oracle Cluster Registry Backup Files in Real Application Clusters

    The CRS are managed by a CRS instance. There will be one CRS instance for each node in a RAC cluster. In a cluster, CRS instance automatically creates an OCR backup every four hours. At any one time, the last three backup copies are automatically retained. The CRS instance also creates and retains an OCR backup for each full day and at the end of each week. The backup frequencies or the number of files that Oracle will retain cannot be customized as they are completely controlled by the CRS instance.

    Because of the importance of OCR information, the ocrconfig tool should be used to make daily copies of the automatically generated backup files.

    To make a backup, use the ocrconfig tool with the showbackup option to identify the backup files, and then copy each file to a location that is redundant to the location of the original OCR backup file. This ensures that there are at least two copies of each OCR backup file.

    Oracle also recommends that the OCR location reside on RAID arrays. If possible, use a backup location that is shared by all nodes in the cluster. The default target location of each OCR backup file is as follows where <cluster name> is the name assigned to the cluster when CRS was installed:

    <CRS Home>/cdata/<cluster name>

    This location can be changed by using the following syntax:

    ocrconfig -backuploc <directory name>

    Restoration of the OCR File from the Automatically Generated OCR Backups

    Before attempting to resolve any configuration-related problems, retry the application that failed. If the problem continues, then use one of the following platform-specific procedures to restore the OCR configuration.

    Procedure for Restoring the Oracle Cluster Registry on UNIX-Based Systems

    1. Stop the following OCR daemons: CSSD, CRSD, EVMD, and the EVM logger. On Linux the init.crs script located in the /etc/init.d directory is used to stop these daemons, for example:

    [root@aultlinux1 init.d]#/etc/init.d/init.crs stop

    2. Shut down all the nodes in the cluster and restart from one node in single-user mode.

    3. Identify the recent backups using the ocrconfig -showbackup command.

    4. Execute the restore by applying an OCR backup file identified in Step 3 with the ocrconfig -restore <file name> command.

    5. Restart the CRS, CSS, and EVM daemons and resume operations in cluster mode. The daemons can be restarted using the same script as in step one only use the start option:

    [root@aultlinux1 init.d]#/etc/init.d/init.crs start

    Procedure for Restoring the Oracle Cluster Registry on Windows-Based Systems

    1. Shut down all but one node in the RAC database.

    2. Disable the following OCR clients and stop them using the Service Control Panel:

    * OracleClusterVolumeService,

    * OracleCSService,

    * OracleCRService, and the

    * OracleEVMService.

    3. Identify the recent backups using the ocrconfig -showbackup command.

    4. Execute the restore by applying an OCR backup file identified in Step 3 with the ocrconfig -restore <file name> command.

    5. Start all the services that were stopped in step 2. Restart all the instances and resume operations in cluster mode.

+ Reply to Thread

Similar Threads

  1. Recover Corrupt/Missing OCR and Voting Disk with No Backup
    By devesh_ocp in forum RAC Concepts and Administration
    Replies: 0
    Last Post: 04-26-2012, 11:17 AM
  2. Oracle 11g Feature Multisection Backup.
    By ajaychandi in forum Core Database Administration and Monitoring
    Replies: 0
    Last Post: 01-03-2012, 03:25 AM
  3. Recover Corrupted or Accidentally deleted Context File
    By Hemant in forum AD Utilities , Autoconfig , FND Utilities
    Replies: 0
    Last Post: 11-01-2011, 07:03 PM
  4. Recover 1 TB data
    By ajaysingh in forum Backup, Restoration & Recovery, RMAN, Flashback, Datapump, Export, Import
    Replies: 1
    Last Post: 10-31-2011, 03:42 PM
  5. Rolling back Autoconfig using restore.sh
    By Hemant in forum AD Utilities , Autoconfig , FND Utilities
    Replies: 0
    Last Post: 10-30-2011, 03:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics