1. Home
  2. Knowledge Base
  3. Backup and Recovery
  4. Using FLASHBACK after a Data Guard Failover

Using FLASHBACK after a Data Guard Failover

Original Data Guard Environment


Perform FAILOVER TO ITLINUX03 (now the new Primary)

Next in ITLINUX03 .....

Step 1: On the new primary, run the following query to determine at what SCN it became
the new primary.

bozo:/u01/ORACLE/bozo> sql

SQL*Plus: Release - Production on Mon May 9 14:48:57 2005

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP and Data Mining options

SQL> select to_char(standby_became_primary_scn) from v$database;

Step2: Bring the old primary database to the mount state and flashback to SCN retrieved in Step 1.

Go to original primary machine (HQLINUX05)…

 shutdown immediate;
 startup mount;
 flashback database to scn 387774;

Flashback complete.

SQL> alter database flashback off;  - since flashback logs are no more valid.


On the old primary(hqlinux05), create a standby controlfile

SQL>alter database create standby controlfile as '/tmp/standby1.ctl';

Step 5:

SQL>Shutdown immediate;

Copy the standby control file to the control_files location in the init.ora(hqlinux05)
which is the original primary.

rename the standby controlfile standby1.ctl to match the names of the control files
as defined in the control_files parameter in the init.ora.

Step 6:

SQL> Startup mount;

SQL> Alter database flashback on;

On the new primary(itlinux03) enable log shipping…

SQL> alter system set log_archive_dest_state_2=ENABLE  scope=both;

On the new standby/old primary start managed recovery - (hqlinux05)

SQL> Alter database recover managed standby database disconnect;
The following two tabs change content below.

Gavin Soorma

Latest posts by Gavin Soorma (see all)

Updated on June 2, 2021

Was this article helpful?

Related Articles

Leave a Comment