【翻译自mos文章】将一个失败的primary database 复原为physical standby 库的步骤

将一个失败的primary database 复原为physical standby 库的步骤

参考自:

Step by Step Guide on How To Reinstate Failed Primary Database into Physical Standby (文档 ID 738642.1)

适用于:

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***

解决方案:

There are two 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 have been enabled on the database prior to the failover

2. There must be sufficient flashback logs on that database to flashback up to the scn when standby becomes the primary

3. The database to be reinstated and the new primary database must have network connectivity

4. Failed primary database should be part of 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 be reinstated link.

This brings up the General Properties page that provides a Reinstate button. After you click the Reinstate button, Enterprise Manager begins reinstating the database.When the process is complete, the database will be enabled as a standby database to the new
primary database, and Enterprise 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 that is to 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 have not set the remote archive destination on 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 that 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

时间: 2024-12-27 10:00:33

【翻译自mos文章】将一个失败的primary database 复原为physical standby 库的步骤的相关文章

【翻译自mos文章】在一次失败的 &#39;Shutdown Immediate&#39;之后,数据库job 不能运行。

在一次失败的 'Shutdown Immediate'之后,数据库job 不能运行. 参考原文: Database Jobs Do Not Run After a Failed 'Shutdown Immediate' (Doc ID 434690.1) 适用于: Oracle Server - Enterprise Edition - Version 9.2.0.1 to 10.2.0.1 [Release 9.2 to 10.2] Information in this document a

【翻译自mos文章】在dg环境中flashback primary database的方法

在dg环境中flashback primary database的方法 本文的本意是:在flashback了primary database之后,flashback standby database的方法. 参考自: How To Flashback Primary Database In Standby Configuration (文档 ID 728374.1) 适用于: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 1

【翻译自mos文章】SGA_TARGET与SHMMAX的关系

SGA_TARGET与SHMMAX的关系 参考原文: Relationship Between SGA_TARGET and SHMMAX (文档 ID 1527109.1) 适用于: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2] Information in this document applies to any platform. 目的: 解释了参数文件中

【翻译自mos文章】在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information)

在重建控制文件之后,丢失了数据库补充日志信息(Missed Database Supplemental Log Information) 参考原文: Missed Database Supplemental Log Information After Recreate Controlfile In 10g Database. (Doc ID 1474952.1) 适用于: Oracle Server - Enterprise Edition - Version 10.1.0.2 and late

【翻译自mos文章】Main Note - ogg的 Supplemental Logging and TRANDATA

Main Note - ogg的 Supplemental Logging and TRANDATA 参加原文: Main Note - Supplemental Logging and TRANDATA for OGG (Doc ID 1537838.1) 适用于 Oracle GoldenGate - Version 9.5_EA and later Information in this document applies to any platform. 目的 从oracle redo l

【翻译自mos文章】使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法

使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法 参考原文: How to Copy asm files between remote ASM instances using ASMCMD command (Doc ID 785580.1) 适用于: Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2] Information in thi

【翻译自mos文章】修改被 DB Control 监控的db (10g and 11g)中 dbsnmp密码的方法

修改被 DB Control 监控的db (10g and 11g)中 dbsnmp密码的方法 参考原文: How to Change DBSNMP Password in Database 10g and 11g Monitored by DB Control (Doc ID 259387.1) 适用于: Enterprise Manager for Oracle Database - Version 10.1.0.4 to 11.2.0.3 [Release 10.1 to 11.2] In

【翻译自mos文章】在OGG (Oracle GoldenGate) 中使用SCHEMATRANDATA的话,需要额外的db patch

在OGG (Oracle GoldenGate) 中使用SCHEMATRANDATA的话,需要额外的db patch 参考原文: Patches needed to support SCHEMATRANDATA in OGG (Oracle GoldenGate) (Doc ID 1426440.1) 适用于: Oracle GoldenGate - Version 11.1.1.1.1 and later Information in this document applies to any

【翻译自mos文章】使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方案。

使用aum( Automatic Undo Management) 时遇到 ORA-01555错误--- 原因和解决方案. 参考原文: ORA-01555 Using Automatic Undo Management - Causes and Solutions (Doc ID 269814.1) 适用于: Oracle Database - Enterprise Edition - Version 9.0.1.0 and later Information in this document