how to Flashback when we have dataguard



Last updated on December 21st, 2015 at 06:37 am

We generally have Dataguard in the Production env and for some reason  if we have to flashback Production,then below steps could be used which will keep the standby in the Sync
1. Disable Log Transport Services to the Standby Database On Primary database
alter system set log_archive_dest_state_n = ‘defer’ scope=both;

2. Perform a Log Switch on all Primary Database Instances
alter system switch logfile;

3. Stop Managed Recovery on the Standby Database using SQL*PLUS

alter database recover managed standby database cancel;

4. Shutdown the Primary database and startup in mount state
shutdown immediate
startup mount

5. Flashback the Primary Database to the desired Restore Point and open the database with resetlogs
flashback database to restore point ;
alter database open resetlogs;

6. Flashback the Standby Database to the desired Restore Point:

flashback database to restore point ;

7. Enable Log Transport Services to the Standby Database

On  Primary database,
alter system set log_archive_dest_state_n = ‘enable’ scope=both;

8. Perform a Log Switch on all Primary Database Instances
alter system switch logfile;

9. Once Log Transport Services are running again you can enable Managed Recovery on the Standby Database:
alter database recover managed standby database using current logfile disconnect

10.Verify the Standby Database is now following the Primary Database into the new Incarnation


Leave a Reply