OCR
OCR stands for Oracle Cluster Registry. It’s a key component of RAC which is used to manage and monitor the RAC cluster.
* It is a repository that stores configuration information about the RAC environment like name and location of the database instance, the network configuration, and the location of the shared storage , resources managed by the cluster, such as services, virtual IP addresses, and application resources.
* OCR is typically stored on shared storage that is accessible by all nodes in the cluster.
* The OCR is updated automatically as changes are made to the cluster configuration, such as when a new database instance is added or a service is created. The OCR is also replicated to all nodes in the cluster, ensuring that each node has a consistent view of the cluster configuration.
* 1. OCR is a cluster registry used to maintain application resources and their availability within the RAC environment.
* 2. It also maintains application resources defined within clusterware. Like database instance, services, VIP , ONS GSD and listener information OCR location path is in OCR.loc file in /etc directory
* Node membership information.
* OCR also contains information about the location of voting disk.Server, Network, RAC Database, Instance, Node and Listener UP/Down and other mapping information and ASM Instance and Disk groups Information.
* Cluster and Application resource profiles Information (such as RAC database, listener, Instance, VIP, Scan IP, Serverpool and Services etc ).
* TAF Policy, Load Balancing information.
* Details of the network interfaces held by the cluster network.
* Information about processes that Oracle Clusterware controls.
* Information about any third-party applications controlled by CRS.
* Information about OCR Backups.
* Software active version.
* CSSd at the time of cluster setup to update the status of the servers.
* CSS during node addition and Node Deletion.
* CRSd about status of nodes during failures and reconfiguration.
* Utilities: OUI, SRVCTL, CRSCTL, OEM, NETCA, DBCA, DBUA, ASMCA.
* Oracle Clusterware reads the ocr.loc file for the location of the registry and to determine which application resources need to be started and the nodes on which to start them.
* It is used to bootstrap the CSS for port info, nodes in the cluster and similar info.
* The CRSd, or Oracle Clusterware daemon’s function is to define and manage resources managed by Clusterware. Resources have profiles that define metadata about them. This metadata is stored in the OCR. The CRS reads the OCR and manages and Implement the following:
* It performs automatically every four hours in the CRS_HOME/Cdata/cluster_name directory. We can not customized auto backup but
* we can change auto backup location by using ocrconfig - backuploc
* We can take backup manually using “ocrconfig - export
* We can check backup location using “ocrconfig -show backup”
* server failures.
* OCR holds all the cluster related information such as instances, services. The OCR file format is binary and starting with 10.2 it is possible to mirror it.
* Location of file(s) is located in: /etc/oracle/ocr.loc in ocrconfig_loc and ocrmirrorconfig_loc variables.
* Obviously if you only have one copy of the OCR and it is lost or corrupt then you must restore a recent backup. Until a valid backup is restored the Oracle Clusterware will not startup due to the corrupt/missing OCR file.
* If the corruption happens while the Oracle Clusterware stack is up and running, then the corruption will be tolerated and the Oracle Clusterware will continue to function without interruptions.
* Despite the corrupt copy. DBA is advised to repair this hardware/software problem that prevents OCR from accessing the device as soon as possible; alternatively, DBA can replace the failed device with another healthy device using the ocrconfig utility with -replace flag.
* If corruption happens while the Oracle Clusterware stack is down, then it will not be possible to start it up until the failed device becomes online again or some administrative action using ocrconfig utility with -overwrite flag is taken. When the Clusterware attempts to start you will see the error messages.
* There are 3 ways to fix this failure:
* a) Fix whatever problem (hardware/software?) that prevents OCR from accessing the device.
* b) Issue "ocrconfig -overwrite" on any one of the nodes in the cluster. This command will overwrite the vote check built into OCR when it starts up.
* c) This method is not recommended to be performed by customers. It is possible to manually modify ocr.loc to delete the failed device and restart the cluster. OCR won't do the vote check if the mirror is not configured. server failures.
OCR will be unavailable until the ASM instances are restored. This can have serious implications for the availability of the RAC cluster.
To prevent these scenarios from occurring, it is important to ensure that the ASM instances in a RAC cluster are highly available and are properly configured for redundancy. This can involve using features such as ASM mirroring, which ensures that data is automatically replicated across multiple disks and nodes, and ASM rolling upgrades, which allow for upgrades to be performed on ASM instances without causing downtime.
Post a Comment