On Primary
Defer the log shipping to standby.
SQL> Alter system set log_archive_dest_state_2=defer;
Check last log sequence Select max(sequence#) from v$log_history
On Satndby
Enable flashback recovery.
Setup flashback destination and file size.
SQL> Alter system set db_recovery_file_dest=’/u01/flash’ scope=spfile;
SQL> Alter system set db_recovery_file_dest_size=10G scope=spfile;
Cancel the recovery.
SQL> Alter database recover managed standby database cancel;
SQL> Shutdown immediate
Startup database in mount mode.
SQL> Startup mount
Put database in the flashback mode
SQL> alter database flashback on;
Create the Restore Point on the standby database
SQL> Create restore point before_dr guarantee flashback database;
Activate Standby database
SQL> Alter database activate standby database;
Open the DR database
SQL> Alter database open;
Shutdown and restart the database
--- Perform DR tests ---
Steps to rollback and convert to standby.
On Satndby
Shutdown after DR test
SQL>Shutdown immediate
Startup database with mount and force option.
SQL>startup mount force
Restore database to the restored point.
SQL> Flashback database to restore point before_dr;
Drop restored point
SQL> Drop restore point before_dr;
Turn off flashback
alter database flashback off;
Convert database to physical standby
SQL> Alter database convert to physical standby;
shutdown and startup in standby mode
SQL> Shutdown immediate
SQL> startup nomount
SQL> Alter database mount standby database;
SQL> Alter database recover managed standby database disconnect from session;
On Production
Enable the log shipping to standby.
SQL> Alter system set log_archive_dest_state_2='enable';
switch logg and verify the apply.
SQL> alter system switch logfile;
Defer the log shipping to standby.
SQL> Alter system set log_archive_dest_state_2=defer;
Check last log sequence Select max(sequence#) from v$log_history
On Satndby
Enable flashback recovery.
Setup flashback destination and file size.
SQL> Alter system set db_recovery_file_dest=’/u01/flash’ scope=spfile;
SQL> Alter system set db_recovery_file_dest_size=10G scope=spfile;
Cancel the recovery.
SQL> Alter database recover managed standby database cancel;
SQL> Shutdown immediate
Startup database in mount mode.
SQL> Startup mount
Put database in the flashback mode
SQL> alter database flashback on;
Create the Restore Point on the standby database
SQL> Create restore point before_dr guarantee flashback database;
Activate Standby database
SQL> Alter database activate standby database;
Open the DR database
SQL> Alter database open;
Shutdown and restart the database
--- Perform DR tests ---
Steps to rollback and convert to standby.
On Satndby
Shutdown after DR test
SQL>Shutdown immediate
Startup database with mount and force option.
SQL>startup mount force
Restore database to the restored point.
SQL> Flashback database to restore point before_dr;
Drop restored point
SQL> Drop restore point before_dr;
Turn off flashback
alter database flashback off;
Convert database to physical standby
SQL> Alter database convert to physical standby;
shutdown and startup in standby mode
SQL> Shutdown immediate
SQL> startup nomount
SQL> Alter database mount standby database;
SQL> Alter database recover managed standby database disconnect from session;
On Production
Enable the log shipping to standby.
SQL> Alter system set log_archive_dest_state_2='enable';
switch logg and verify the apply.
SQL> alter system switch logfile;