"Translated from MoS article" steps to revert a failed primary database to the physical standby library

Source: Internet
Author: User

To revert a failed primary database to the physical standby library

Reference from:
Step by Step Guide, reinstate Failed Primary Database into physical Standby (document ID 738642.1)

Suitable for:
Oracle database-enterprise edition-version 10.1.0.2 and later
Information in this document applies to any platform.
Checked for relevance on 24-jul-2013***


Solution:

there is ways to reinstate Failed Primary Database:

1. Using Flashback
2. Without using Flashback

1. Reinstate Failed Primary Database using Flashback

prerequisites for Reinstate Failed Primary Database:

1. Flashback Database must has been enabled on the Database prior to the failover
2. There must is sufficient flashback logs on that database to flashback up to the SCN when standby becomes the primary
3. The database to is reinstated and the new primary database must have network connectivity
4. Failed primary database should is part of the broker configuration (in case of using EM or DGMGRL).

Methods to reinstate database using Flashback:

A. Using Enterprise Manager
B. Using DGMGRL
C. Using Sql*plus

A. Using Enterprise Manager

On the Data Guard Overview page, click the Database must is reinstated link.
This brings to the General Properties page that provides a reinstate button. After you click the Reinstate button, Enterprise Manager begins reinstating the database. When the process was complete, the database would be enabled as a standby database to the new primary database, and ENTERPRI Se Manager Displays the Data Guard Overview page.

B. Using DGMGRL

1. Startup the Failed Primary Database in the Mount stage:

Sql> Startup Mount

2. Issue the following command while connected to any database in the broker configuration, except the database Be reinstated:

Dgmgrl> reinstate DATABASE <db_unique_name of failed primary>;

If the reinstate database fails to start the Failed Primary database, then manually start the database in Mount stage and Reissue the reinstate command.

C. Using Sql*plus

Step 1 Determine the Standby became Primary SCN.
Step 2 Flashback the Failed Primary Database.
Step 3 Convert to physical standby database.
Step 4 Restart Redo Transport.
Step 5 Start Redo Apply.

Step 1 determine the SCN at which the old standby database became the primary database.

Sql> SELECT To_char (STANDBY_BECAME_PRIMARY_SCN) from V$database;

Step 2 Flashback the Failed Primary Database to SCN standby_became_primary_scn.

Sql> SHUTDOWN IMMEDIATE;
Sql> Startup Mount
Sql> FLASHBACK DATABASE to SCN <standby_became_primary_scn of step 1>;

Step 3 Convert The database to a physical standby database and Restart database in Mount stage.

Sql> ALTER DATABASE CONVERT to physical STANDBY;
Sql> SHUTDOWN IMMEDIATE;
Sql> STARTUP MOUNT;

Step 4 Restart Redo Transport to the New physical Standby Database.

1. If you had not set the remote archive destination in current primary then set remote archive destination:

Sql>alter SYSTEM SET log_archive_dest_2 = ' service=<service_name_of_failed_primary_database> VALID_FOR= ( Online_logfiles,primary_role) db_unique_name=<db_unique_name> ' Scope=both;

2. Enable the destination

Sql>alter SYSTEM SET log_archive_dest_state_2=enable;

3. Perform a log switch to ensure this standby database begins receiving redo data from the new primary database

sql> ALTER SYSTEM SWITCH LOGFILE;
Sql> SELECT dest_id, STATUS, ERROR from V$archive_dest WHERE dest_id=2;

Step 5 Start Redo Apply.

sql> ALTER database RECOVER MANAGED STANDBY database DISCONNECT from SESSION;

Please see also fallowing docu:

Oracle? Data Guard Concepts and administration
11g Release 2 (11.2)

13.2 Converting a Failed Primary into a Standby database Using Flashback Database


2. Without Using Flashback

Use Note 416310.1:reinstating a physical Standby Using Backups Instead of Flashback

"Translated from MoS article" steps to revert a failed primary database to the physical standby library

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.