Oracle Dataguard normal switchover and emergency switching

Source: Internet
Author: User
Tags failover switches

Oracle Dataguard Normal switchover and emergency switching

Oracle Dataguard offers offsite disaster recovery solutions that can effectively prevent single points of failure and provide highly available technology, which describes dataguard normal primary and standby switching and emergency switching (emergency switching analog main library problems can not be restored, The repository is detached from the Dataguard takeover of the main library for external service)

1) Oracle Dataguard Environment Setup
Portal:Linux Installation oracle10g configuration Dataguard Introduction and steps http://blog.csdn.net/w63667329/article/details/7890417 continuation of the last section of the environment: pridb 172.25.56.149 Stydb 172.25.56.150
2) Normal primary and standby switching (switchover)

Main Library PRIDB:
Select Switchover_status from v$database; (Query current state)

Switchover_status
--------------------
SESSIONS ACTIVE

ALTER DATABASE commit to switchover-physical standby with session shutdown; (Switch to standby mode)
Restart the database to mount State;Shutdown ImmediateStartup Mount
Select Switchover_status from V$database; (Re-check status)

Switchover_status
--------------------
To PRIMARY

ALTER DATABASE recover managed standby databasedisconnect; (Turn on standby apply recovery mode)

Check Status Select Open_mode,database_role from V$database;
Open_mode Database_role
----------             ----------------
Mounted physical STANDBY

Standby Library Stydb:

Select Switchover_status from V$database;

Switchover_status
--------------------
SESSIONS ACTIVE


ALTER DATABASE commit to switchover to primary;

Restart the database open

Shutdown immediate

Startup


Select Switchover_status from V$database;

Switchover_status
--------------------
SESSIONS ACTIVE


Select Open_mode,database_role from V$database;

open_mode  database_role
----------           ----------------
OPEN   & nbsp PRIMARY


The original repository switches to the repository and the repository switches to the main library.


Synchronization test: Pridb (new): Select sequence#,applied from V$archived_log;

Stydb (new): Select sequence#,applied from V$archived_log;
PS: Picture lazy, but the test principle is the same, just to ensure that the 2-side sequence serial number consistent and the latest app returns Yes, it means the repository received the application and resumed.


3) Emergency switch

(Note: Simulation of the main library due to failure is not normal switchover, need to perform failover, force the library->pridb and take over the business)


1. Prepare the library:

Since it is a failover, understanding the main library is not working properly at this time, only the standby library switches to PRIDB


Stop Applying recovery mode

ALTER DATABASE recover managed standby database finish;

convert standbydb to Primary db

ALTER DATABASE commit to switchover to primary;

Restart the database to resume normal business

Shutdown immediate

Startup


Select Open_mode,database_role from V$database;

Open_mode Database_role
----------             ----------------
OPEN PRIMARY


Ps:failover will destroy the Dataguard mode, need to reconfigure Dataguard, heard can not reconfigure, but I did not experiment successfully, there are ways to communicate with you.http://blog.csdn.net/w63667329/article/details/7900270

Oracle Dataguard normal switchover and emergency switching

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.