ORACLE Datagurard Toss Two

Source: Internet
Author: User

The previous article continued, the book connected to the last time, this toss data guard an important purpose is to use switchover to achieve machine upgrade, how switchover it? As I understand it, the role switching of Data guard is a process:

(1) Let the primary node become the standby node.

(2) make one of the standby nodes into a primary node

Here is meant to be "one", that is, Node A is primary turned into standby, suddenly I regret, or can immediately let him change back to primary node, the concrete look operation:

At this time test02 is the primary node, test03 is the standby node, because test03 missing a parameter, a little test03 into primary, the archive will not automatically send to test02, so the first step to complete this parameter:

12 ##### test03 target priamry, standby now #####alter system setlog_archive_dest_2=‘service=mydb_test02‘;

Let test02 change from primary to standby:

12 ##### test02, target standby, primary now #####alter database commit to switchover to physical standby ;

The above statement may encounter the following error:

1234 alter database commit to switchover to physical standby*ERROR at line 1:ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected

This is due to the fact that some connections have not been released, and if this happens after the front end application is closed, you can use the following statement to confirm which connections are available:

1234 ##### test02, target standby, primary now #####SELECT SID, PROCESS, PROGRAM FROM V$SESSION   WHERE TYPE = ‘USER‘AND SID <> (SELECT DISTINCT SID FROM V$MYSTAT);

If it is a connection to an Oracle internal process, do not bother him, execute the following statement:

1234 ##### test02, target standby, priamry now #####alter database commit to   switchover to physical standby   with session shutdown

Convert the test03, which is the original standby node, to primary:

123 ##### test03, target primary, standby now #####alter database commit to switchover to primary;##### test03, target primary, primary now #####

Open the database of the primary node so that it can serve externally:

123 ##### test03, target primary, primary now #####shutdownimmediate;startup;

Start the archive recovery process for standby:

12 ##### test02, target standby, standby now #####alter database recover managed standby database disconnect from session;

Now that the data Guard master switch has been completed, you can monitor the alert file of the standby and log in the Primay to see if there is an archive log sent over and restored.

If the monitoring time is longer (more than 5 minutes) you will see the following error:

123456789101112131415161718 ##### primary alert #####Fri Dec 17 14:04:46 2010Redo Shipping Client Connected as PUBLIC-- Connected User is ValidRFS[10]: Assigned to RFS process 12079RFS[10]: Database mountID mismatch [0x9e217391:0x9e217bca]RFS[10]: Client instance is standby database instead of primaryRFS[10]: Not using real application clustersFri Dec 17 14:04:46 2010Errors infile/u01/app/admin/mydb/udump/mydb_rfs_12079.trc:ORA-16009: remote archive log destination must be a STANDBY database  ##### standby alert #####Fri Dec 17 14:04:54 2010Errors infile/u01/app/admin/mydb/bdump/mydb_arc1_6821.trc:ORA-16009: remote archive log destination must be a STANDBY databaseFri Dec 17 14:04:54 2010PING[ARC1]: Heartbeat failed to connect to standby ‘mydb_test02‘. Error is 16009.

Although it does not affect the function and use of Data Guard, how to solve it? In fact, this is the archive process archn process in mischief, think of ways to block it, a comparison of the soil is the log_archive_dest_2 of the node is set to empty, that is, back to the previous article mentioned that configuration, another smart point is to introduce valid _for Parameters:

12345 ##### test02 #####alter system setlog_archive_dest_2=‘service=mydb_test03 valid_for=(online_logfiles,primary_role)‘; ##### test03 #####alter system setlog_archive_dest_2=‘service=mydb_test02 valid_for=(online_logfiles,primary_role)‘;

These two errors are no longer visible in the alert file.

ORACLE Datagurard Toss Two

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.