How to Flashback Primary database with a Standby configuration.
The Quick, Down and Dirty (if you want the why's, please read the documentation)
To Flashback primary database execute following steps :
1. Shutdown primary database .
SQL> SHUTDOWN IMMEDIATE
2. Start primary database in mount stage
SQL> STARTUP MOUNT
3. Flashback primary database to specified scn
SQL> FLASHBACK DATABASE TO SCN ;
or
SQL> FLASHBACK DATABASE to <restore_point);
4. Open primary database with reset logs.
SQL> ALTER DATABASE OPEN RESETLOGS;
5. Cancel media recovery on the standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
6. Check current_scn on the standby database, If flashback scn is greater then current_scn then skip next step (step 7).
SQL> SELECT CURRENT_SCN FROM V$DATABASE;
7. Flashback Standby database
SQL> FLASHBACK STANDBY DATABASE TO SCN ; (on standby database)
8. Start managed recovery on the standby database
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;</restore_point);
The Quick, Down and Dirty (if you want the why's, please read the documentation)
To Flashback primary database execute following steps :
1. Shutdown primary database .
SQL> SHUTDOWN IMMEDIATE
2. Start primary database in mount stage
SQL> STARTUP MOUNT
3. Flashback primary database to specified scn
SQL> FLASHBACK DATABASE TO SCN ;
or
SQL> FLASHBACK DATABASE to <restore_point);
4. Open primary database with reset logs.
SQL> ALTER DATABASE OPEN RESETLOGS;
5. Cancel media recovery on the standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
6. Check current_scn on the standby database, If flashback scn is greater then current_scn then skip next step (step 7).
SQL> SELECT CURRENT_SCN FROM V$DATABASE;
7. Flashback Standby database
SQL> FLASHBACK STANDBY DATABASE TO SCN ; (on standby database)
8. Start managed recovery on the standby database
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;</restore_point);
No comments:
Post a Comment