How to Flashback Primary Database in Oracle Dataguard

Following are the steps to flashback primary database in Dataguard

  1. Cancel media recovery on the standby database.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

2.  Shutdown primary database.

shutdown immediate;

3.  Start primary database in mount stage.

STARTUP MOUNT

4. Flashback primary database to a specified scn

FLASHBACK DATABASE TO SCN <scn_number>;

5. Open primary database with reset logs.

ALTER DATABASE OPEN RESETLOGS;

6. Check current_scn on the standby database, flashback scn is greater than current_scn then skip the next step (step 7).

SELECT CURRENT_SCN FROM V$DATABASE;

7.  Flashback Standby database

FLASHBACK STANDBY DATABASE TO SCN <scn_number -2>;

8. Start managed recovery on the standby database.

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply