Oracle rac ocr and amnesia

Source: Internet
Author: User

OCR is like a Windows registry that stores all configuration information related to the cluster and Rac database. It is also a public configuration, that is, multiple nodes share the same configuration information. Therefore, this configuration should be stored on the shared disk. This article mainly describes the OCR of the cluster and the amnesia caused by OCR based on Oracle 10g RAC.

 

I. OCR features
Similar to the Windows registry, it is used to store all configuration information related to the cluster and Rac database.
Shared by multiple nodes. Therefore, it can only be stored on shared disks. Supports single disk and image storage. Usually 100 MB-1 GB.
In Oracle 10 Gb, it can only be stored on bare devices or ocfs file systems, as well as NFS and GFS file systems. Oracle 11g can be directly stored in ASM.
The configuration of the entire cluster and Rac database must be maintained in OCR. In other words, it is like importing, exporting, modifying, and updating key values in the Windows registry.
In general, the configuration information in OCR is automatically updated with the use of tools. Such as srvctl, dbca, OEM, and netca.
OCR configuration and maintenance usually include OCR verification, backup, view OCR content, add and remove OCR files, relocate, and repair OCR files.
An OCR disk can contain only two primary OCR disks and one mirror OCR disk. The two OCR disks are mirrored to prevent single point of failure (spof) on the OCR disk.
Note: The cluster generally refers to clusterware, And the RAC database is a database based on the cluster.

 

Ii. Content contained in OCR
OCR usually contains the following content:
Node member information
Database instances, nodes, and other Mappings
ASM
Resource configuration information (VIP, services, etc)
Service Characteristics)
Process Information in the Oracle Cluster
Third-party application information controlled by CRS

 

Iii. OCR Process
Because OCR is stored in shared storage, each node in the cluster accesses a copy protected by OCR cache in its memory through the local OCR process. In addition, the OCR
All operations must ensure OCR content integrity. Therefore, not all nodes can operate OCR disks during Oracle clusterware operation. Only one OCR Process
Read and Write operations by using the optical character recognition (OCR) in the storage. This node is called the OCR master node. This process is responsible for refresh its own local cache and other nodes in the cluster.
. In other words, the OCR client queries a local OCR copy through the local OCR process. When the client needs to update the OCR, the local OCR
The process interacts with the OCR master, which plays the role of reading and writing OCR files.

# Below is a two-node RAC. It can be seen that the OCR master node was first in the first node, then transferred to the second node, and then to the first node.
# This is because the OCR master node is transferred when Node 1 is closed or the cluster on node 1 is unavailable.
Oracle @ bo2dbp:/u01/Oracle/CRS/log/bo2dbp/cssd> CAT ocssd. log | grep "master node"
CLSS-3001: local node number 1, master node number 1
CLSS-3001: local node number 1, master node number 1
CLSS-3001: local node number 1, master node number 1
CLSS-3001: local node number 1, master node number 1
CLSS-3001: local node number 1, master node number 2
CLSS-3001: local node number 1, master node number 1
Oracle @ bo2dbp: ~> Grep-I "master node" $ ora_crs_home/log/bo2dbp/cssd/ocssd. log | tail-1
CLSS-3001: local node number 1, master node number 1

OCR client applications include: Oracle universal Installer (Oui), srvctl, Enterprise Manager (EM), dbca, dbua, netca, and vipca ).
In addition, OCR maintains and manages the dependency and status information of various application resources defined in CRS, especially database, instance, services, and node applications.

The OCR configuration file is named OCR. Loc, which is located in/etc/Oracle/OCR. LOC in Linux.
Attached OCR Structure

 

Iv. Representation of OCR content
Similar to the Windows registry, OCR stores the same content in the form of key-value pairs.
The entire OCR information is a tree structure with three major branches. They are system, database, and CRS.
There are many small branches under each branch. The information of these records can only be modified by the root user.
You can use the ocrdump command to export all its content or export it by branch.

5. Amnesia
Forgetful because a node updates the content in OCR, and other nodes in the cluster are in the closed, maintenance, or restart phase, the OCR master process cannot update its information.
Inconsistency caused by cache of these abnormal nodes. For example, if the command to add an OCR image is sent to node A, Node B is in the restart stage. After restart, A has been updated,
At this time, B does not know that a new image disk has been added for OCR, and thus does not forget it.

In the following example, the configuration file changes after the node bo2dbp adds a new OCR. In this case, the node bo2dbs OCR. LOC will be updated. If bo2dbs is in the shutdown or restart phase
This file cannot be updated. This is an example of bit forgetting.

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

Author: Robinson Cheng
Blog: http://blog.csdn.net/robinson_0612

Vi. OCR Structure

 

VII. References
Management and Maintenance of Oracle RAC OCR
Oracle rac ocr backup and recovery

 

8. More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

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.