Redo _ manage redo under cluster Conditions

Source: Internet
Author: User

In the cluster environment, the database instances on each node need their own redo log groups. For example, if the cluster database has three
Nodes and instances. Each instance has at least two redo log groups, and the entire cluster requires at least six online redo log groups. Generally, two
Log groups are the minimum number of groups that can be added to each instance in the project. First, improve efficiency, and second, improve recovery. But no matter how many groups,
All log files are stored on the shared storage medium and can be accessed by other instances.
In a cluster database, the instance recovery process is the same as that of a single node. It is automatically stored in online redo logs.
To restore the instance. The difference is that in the cluster environment, the redo logs of all nodes must be accessible to all other nodes. When the instance is recovered due to the sudden collapse of this node ., Other node database instances that are still in good condition can access the online redo logs and perform instance recovery. Even if the crashed instance cannot be started again, its redo log can still be accessed, and its log data can still be used by other instances for rollback of committed transactions and uncommitted transactions, this enables cluster crash recovery.

Because the instance recovery is completed by the cluster nodes in the cluster, you do not need to recover the instance when the crashed node is restarted. Similarly, as long as the cluster has a surviving node, the database data is complete. If all nodes crash, the first node to be restarted will be restored.

Because each node must have its own private log group, each instance on the cluster database node has an independent log thread number, which is determined by the thread parameter, it will not change. In the following example, the thread parameter in the server parameter file defines the thread Number of Node 1 (orcl1) instance as 1, while the thread Number of Node 2 (orcl2) instance is 2:
|
$ Sqlplus/As sysdba

SQL * Plus: Release 10.2.0.4.0-production on Thu Jan 28 14:00:48 2010

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the partitioning, real Application Clusters, OLAP, Data Mining
And real application testing options

SQL> show parameters thread

Name type value
-----------------------------------------------------------------------------
Parallel_threads_per_cpu integer 2
Thread integer 1

|

$ Sqlplus/As sysdba

SQL * Plus: Release 10.2.0.4.0-production on Thu Jan 28 14:01:23 2010

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the partitioning, real Application Clusters, OLAP, Data Mining
And real application testing options

SQL> show parameters thread

Name type value
-----------------------------------------------------------------------------
Parallel_threads_per_cpu integer 2
Thread integer 2
SQL>
|

Therefore, when you create a redo log for the database cluster, the administrator needs to specify the thread to which the new log group is assigned.
Which RAC instance ). Next, we will add a group for the instance of thread 2 with the group number of 5 and use the ASM automatic storage mode. Therefore, we do not need to specify the file name.
And size:
SQL> alter database add logfile thread 2 group 5;
Database altered.

Next, we will add a group for the instance of thread 1 with the group number of 6 and use the ASM automatic storage method. Therefore, we do not need to specify the file name and size.
SQL> alter database add logfile thread 1 group 6;
Database altered.

Query the newly created log group. Group 5 belongs to instance 2 and has two group members. Group 6 belongs to instance 1 and has two group members, both in the ASM mode.
Storage, named by OMF (Oracle-managed files:

SQL> select group #, member from V $ logfile where group # In (3, 4 );

Group #
----------
Member
--------------------------------------------------------------------------------
3
+ Dg_data/cctt/onlinelog/group_3.266.684757609

3
+ Dg_back/cctt/onlinelog/group_3.259.684757609

4
+ Dg_data/cctt/onlinelog/group_4.267.684757611

Group #
----------
Member
--------------------------------------------------------------------------------
4
+ Dg_back/cctt/onlinelog/group_4.260.684757611

//////////////////////////////////////// //////////////////////////////

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.