Steps for switching the physical Data Guard Master/Slave Database

Source: Internet
Author: User

Physical Data Guard role conversion steps

 

Step 1 verify whether the role of the master database can be converted to the slave database (the original master database)

 

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;SWITCHOVER_STATUS  -----------------  TO STANDBY  1 row selected

 

Step 2 change the physical master database to the physical slave database (executed by the original master database)

 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
Or
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY with session shutdown;

 

NOTE: If an Active session can use this option, otherwise the conversion will encounter a ORA-01093 error, you can also kill the Active session or wait for the conversion after the active session

 

 

Step 3 shut down and restart the master database (executed by the original master database)

SQL> SHUTDOWN IMMEDIATE;SQL> STARTUP MOUNT;

 

Step 4 verify whether the role of the slave database can be converted to the master database (the original slave database)

 

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS ----------------- TO_PRIMARY 1 row selected

 

Step 5 start to convert the physical standby database to the physical primary database (executed by the original standby database)

 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

 

-- If the ORA-16139: media recovery required is reported, it may be caused by the absence of logs, You can first execute

Alter database recover managed standby database disconnect from session;

 

Step 6 open the slave database, and then shut down and restart (executed by the original slave database)

 

SQL> ALTER DATABASE OPEN;

SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;

 

Step 7 verify whether the conversion is successful (executed by the original standby database)

 

SQL> ALTER SYSTEM SWITCH LOGFILE;

 

Setp 8 Application archive log (executed on the original master database)

 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

 

References:

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

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.