Ocrconfig Manualbackup

1 view
Skip to first unread message

Amatista Sheeley

unread,
Aug 4, 2024, 5:54:23 PM8/4/24
to gfulcereatwers
Thisappendix describes the syntax of the Oracle Cluster Registry (OCR) configuration utility, OCRCONFIG, and troubleshooting OCR, which includes descriptions and usage information for OCRCHECK and OCRDUMP.

Use the ocrconfig -add command to add an OCR location to a storage device or Oracle Automatic Storage Management (Oracle ASM) disk group. OCR locations that you add must exist, have sufficient permissions, and, in the case of Oracle ASM disk groups, must be mounted before you can add them.


The default location for generating OCR backups on Linux or UNIX systems is Grid_home/cdata/cluster_name, where cluster_name is the name of your cluster. The Windows default location for generating OCR backups uses the same path structure.


The default location for generating OLR backups on Linux or UNIX systems is Grid_home/cdata/host_name, where host_name is the name of the node on which the OLR resides that you want to back up. The Windows default location for generating OLR backups uses the same path structure.


Use the ocrconfig -repair command to repair an OCR configuration on the node from which you run this command. Use this command to add, delete, or replace an OCR location on a node that may have been stopped while you made changes to the OCR configuration in the cluster. OCR locations that you add must exist, have sufficient permissions, and, in the case of Oracle ASM disk groups, must be mounted before you can add them.


Use the ocrconfig -replace command to replace an OCR device or file on the node from which you run this command. OCR locations that you add must exist, have sufficient permissions, and, in the case of Oracle ASM disk groups, must be mounted before you can add them.


You must have at least two OCR devices to use this command. If you do not have at least two OCR devices, then you must run the ocrconfig -add command to add a new OCR device followed by the ocrconfig -delete command to delete the OCR device you want to replace.


Use the ocrconfig -showbackup command to display the backup location, timestamp, and the originating node name of the backup files. By default, this command displays information for both automatic and manual backups unless you specify auto or manual.


This section describes various methods for troubleshooting problems with OCR, and obtaining diagnostic information from the utilities used to manage OCR. You can use these utilities to troubleshoot OLR.


The OCRCHECK utility displays the version of the OCR's block format, total space available and used space, OCRID, and the OCR locations that you have configured. OCRCHECK performs a block-by-block checksum operation for all of the blocks in all of the OCRs that you have configured. It also returns an individual status for each file and a result for the overall OCR integrity check.


This section explains how to use the OCRDUMP utility to view OCR and Oracle Local Registry (OLR) content for troubleshooting. The OCRDUMP utility enables you to view OCR and OLR contents by writing the content to a file or stdout in a readable format.


You can use several options for OCRDUMP. For example, you can limit the output to a key and its descendents. You can also write the contents to an XML file that you can view using a browser. OCRDUMP writes the OCR keys as ASCII strings and values in a data type format. OCRDUMP retrieves header information based on a best effort basis.


To change the logging component, edit the entry containing the comploglvl= entry. For example, to change the log level of the OCRAPI component to 3 and to change the log level of the OCRRAW component to 5, make the following entry in the ocrlog.ini file:


This section describes the OCRDUMP utility command syntax and usage. Run the ocrdump command with the following syntax where file_name is the name of a target file to which you want Oracle Database to write the Oracle Cluster Registry output and where key_name is the name of a key from which you want Oracle Database to write Oracle Cluster Registry subtree content:


Displays the content of the in the Grid_home/cdata/cluster_name/file_name directory. You must run this command as root to be able to view all of the keys. Be sure to name the file appropriately so that it can be recognized by anyone as an OCR backup file, such as BACKUPOO.ocr.


The following OCRDUMP examples show the KEYNAME, VALUE TYPE, VALUE, permission set (user, group, world) and access rights for two sample runs of the ocrdump command. The following shows the output for the SYSTEM.language key that has a text value of AMERICAN_AMERICA.WE8ASCII37.


I understand the OCR backups are automatically generated on the master node in the $GRID_HOME/cdata/clustername sub-directory. I wanted to generated an ocr backup manually using the -manualbackup option. But it got generated on a leaf node (Not the master node).


I'm searching for while to delete manual backup from local ocr. I've tried ocrconfig -delete . But I always get PROT-34 error. I dont know how to manage these backups. I even have old one listes by ocrconfig that don't exist anymore.


This section describes how to back up OCR content and use it for recovery. The first method uses automatically generated OCR copies and the second method enables you to issue a backup command manually:


The ocrconfig -showbackup command displays the backup location, timestamp, and the originating node name of the backup files that Oracle Clusterware creates. By default, the -showbackup option displays information for both automatic and manual backups but you can include the auto or manual flag to display only the automatic backup information or only the manual backup information, respectively.


Starting with Oracle Clusterware 12c release 2 (12.2), the default location for generating backups is an Oracle ASM disk group, which you can change between Oracle ASM disk groups, but you cannot change to a local file system. Oracle recommends that you include the backup file created with the OCRCONFIG utility as part of your operating system backup using standard operating system or third-party tools.


The file_name variable in the preceding command can be a full directory path name that is accessible by all nodes, or it can be an Oracle ASM disk group that is mounted on all nodes. You must migrate OCR to Oracle ASM before changing the OCR backup location to an Oracle ASM disk group. You can change the OCR backup location to an Oracle ASM disk group only if there is at least one Oracle ASM OCR location in a separate disk group.


12c Grid Infrastructure introduces software patch level and active patch level to ensure GI home has identical patches on all nodes. Unless the cluster is in rolling patch mode, a node won't be able to join the cluster if it has different patch level.


At the end of a patch application to GI home, the software patch level will be updated on each node. On the last node, the active patch level will be updated for the cluster. It's highly recommended to manually take an OCR backup with "ocrconfig -manualbackup" command before and after applying a patch.


In this Document

GoalSolutionReferences My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.




OCR calls Oracle Cluster Registry. It stores cluster configuration information. It is also shared disk component. It must be accessed by all nodes in cluster environment.It also keeps information of Which database instance run on which nodes and which service runs on which database.The process daemon OCSSd manages the configuration info in OCR and maintains the changes to cluster in the registry.


Automatic backup of OCR is done by CRSD process and every 3 hours. Default location is CRS_home/cdata/cluster_name. But we can change default location of this backup of OCR. We can check default location using following command.


First check exact location of automatic OCR backup location using "ocrconfig -showbackup" command. Because this automatic backup of OCR is physical copies of Oracle Cluster Registry. There is no need to bring down Cluster to take this physical backup of OCR. Use simple operating system's copy command to copy this physical OCR copy to backup destination as give below.


We can take export backup of OCR (Oracle Cluster Registry) also in online. There is no need to bring down Cluster to take export backup of OCR. Manual backup can be taken using "ocrconfig -export" command as follows.


For recovering OCR from physical automated backup needs all cluster, RAC instances and RAC database bring down before performing recovery of OCR. Here you can find out command reference for Recovery of OCR from physical backup copy.


We can import metadata of OCR from export dump. Before importing Stop Oracle RAC database, RAC instances and Cluster. Reboot Cluster and remove OCR partition as well as OCR mirror partition. Recreate using 'dd' command both partitions. Import metadata of OCR from export dump file of backup. Example commands as following...


OCR backup needs to monitoring constantly. Because OCR is important part of Oracle RAC. During remote database monitoring and remote database services, we need to take care of backup of OCR for Oracle RAC database administration.


Dbametrix is world wide leader in remote dba support. Expert remote DBA team of Dbametrix is offering high quality professional Oracle DBA support with strong response time to fulfill your SLA. Contact our sales department for more information with your requirements for remote dba services.


It is not possible to directly restore a manual or automatic OCR backup if the OCR is located in an ASM disk group. This is caused by the fact that the command 'ocrconfig -restore' requires ASM to be up & running in order to restore an OCR backup to an ASM disk group. However, for ASM to be available, the CRS stack must have been successfully started. For the restore to succeed, the OCR also must not be in use (r/w), i.e. no CRS daemon must be running while the OCR is being restored.


A description of the general procedure to restore the OCR can be found in the documentation, this document explains how to recover from a complete loss of the ASM disk group that held the OCR and Voting files in a 11gR2 Grid environment.

3a8082e126
Reply all
Reply to author
Forward
0 new messages