Use the Broker-mode switch in the DataGuard Environment

Source: Internet
Author: User

I. Environment Introduction
 
Data Guard environment:
 
Primary Database: Oracle10.2.0.5.0
OS: RedHat 4.4
Host Name: source
IP Address: 192.168.10.101
Database SID: source
DB_UNIQUE_NAME: source_pr
 
Standby Database: oracle10.2.0.5.0
OS: redhat 4.4
Host Name: target
IP Address: 192.168.10.102
Database SID: source
DB_UNIQUE_NAME: source_st
 
 
Ii. Restart uard
 
 
Note the Data Guard startup sequence:
 
Startup sequence: First standby, then primary;
Close sequence: first primary and then standby;
 
Start the instance to the mount status in the slave database:
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect from session;
To cancel Restoration: alter database recover managed standby database cancel;
 
Start the listener in the slave database:
$ Lsnrctl start
 
Start the instance in the master database:
SQL> startup;
 
Start the listener in the master database:
$ Lsnrctl start
 
Verify whether the archive directory is valid in the master database:
 
SQL> select dest_name, status, error from v $ archive_dest;
 
If any error occurs, check the cause.
 
SQL> alter system switch logfile;
SQL> select max (sequence #) from v $ archived_log;
 
View database Modes
SQL> select dest_name, status, database_mode, recovery_mode, protection_mode from v $ archive_dest_status;
SQL> select status, database_mode from v $ archive_dest_status;
SQL> select OPEN_MODE, PROTECTION_MODE, ACTIVATION #, DATABASE_ROLE, SWITCHOVER #, SWITCHOVER_STATUS from v $ database;
 
 
Iii. protection mode switching experience
 
The protection mode of my initial configuration of DG is maximum performance. In the following experience, I will switch the MAXIMUM PERFORMANCE of the following modes respectively --> MAXIMUM protection
Maximum protection --> maximum availability
Maximum availability --> maximum protection
Maximum protection --> maximum performance
Maximum performance --> maximum availability
 
When the order of protection mode changes:
Maximize protection ---> maximize availability ----> maximize performance
When the protection level of the secondary uard is reduced in the above Order, the primary database is not required to be in the mount state; otherwise, the primary must be in the mount state.
If the protection mode is upgraded, for example, from the highest-performance mode to the highest-available mode, you must first shut down the database and then mount the database. If the protection mode is downgraded, you can directly
 
Data guard data protection mode maximum protection maximum availability maximum performance
REDO write process LGWR or ARCH
In network transmission mode, SYNC is used when the LGWR process is SYNC or ASYNC, and the ARCH process is used as YNC.
Disk write operations: affrem or noaffrem
Whether standby redologs is required. YES, but none are recommended.
 
 
1. maximum performance --> maximum Protection Switching
 
DGMGRL> edit database source_pr set property LogXptMode = 'sync ';
Property "logxptmode" updated

DGMGRL> edit database source_st set property LogXptMode = 'sync ';
Property "logxptmode" updated

DGMGRL> edit configuration set protection mode as maxprotection; -- the restart process is automatic.
Operation requires shutdown of instance "source" on database "source_pr"
Shutting down instance "source "...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "source" on database "source_pr"
Starting instance "source "...
ORACLE instance started.
Database mounted.
 
2. maximum protection --> maximum available Switch
 
This action is relatively simple and does not need to be changed.
 
DGMGRL> edit configuration set protection mode as maxavailability;
Succeeded.
3. maximum availability --> maximum protection switch
 
DGMGRL> edit configuration set protection mode as maxprotection;
Operation requires shutdown of instance "source" on database "source_pr"
Shutting down instance "source "...
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "source" on database "source_pr"
Starting instance "source "...
ORACLE instance started.
Database mounted.
DGMGRL>
4. maximum protection --> maximum performance switching
 
 
DGMGRL> edit database source_pr set property LogXptMode = 'async ';
Property "logxptmode" updated
 
DGMGRL> edit database source_st set property LogXptMode = 'async ';
Error: ORA-16805: change of LogXptMode property violates overall protection mode
 
DGMGRL> edit configuration set protection mode as maxperformance;
Succeeded.

DGMGRL> edit database source_st set property LogXptMode = 'async ';
Property "logxptmode" updated
5. maximum performance --> switchover of maximum availability
 
DGMGRL> edit database source_pr set property LogXptMode = 'sync ';
Property "logxptmode" updated

DGMGRL> edit database source_st set property LogXptMode = 'sync ';
Property "logxptmode" updated
 
DGMGRL> edit configuration set protection mode as maxavailability;
Succeeded.

For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12

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.