Activate physical standby database and flashback

— standby

SQL> alter database recover managed standby database cancel;
SQL> create restore point standby_flashback_testing guarantee flashback database;
SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
SQL> col name for a30
SQL> select name, scn, time from v$restore_point;

NAME SCN TIME
------------------------------ ---------- ---------------------------------------------------------------------------
STANDBY_FLASHBACK_TESTING 241386 04-MAY-16 09.40.06.000000000 PM

— primary

SQL> alter system archive log current;
SQL> alter system set log_archive_dest_state_2=defer;

— standby

SQL> alter database activate standby database;
SQL> select controlfile_type from v$database;
SQL> alter database set standby database to maximize performance;
SQL> alter database open;

— Revert active standby database back to Physical standby

— standby

SQL> STARTUP MOUNT FORCE
SQL> flashback database to restore point standby_flashback_testing;
SQL> select controlfile_type from v$database;

SQL> alter database convert to physical standby;
SQL> startup mount force;
SQL> alter database recover managed standby database using current logfile disconnect;
SQL> select controlfile_type from v$database;
SQL> drop restore point standby_flashback_testing;

— primary:

SQL> alter system archive log current;
SQL> alter system set log_archive_dest_state_2=enable;

Reference:

Physical Standby Read/Write Testing With Belated Flashback Database (Doc ID 838249.1)
How to Open Physical Standby For Read Write Testing and Flashback ( Doc ID 805438.1)
Steps to perform for Rolling Forward a Physical Standby Database using RMAN Incremental Backup. (Doc ID 836986.1)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s