Time for action – converting to a snapshot standby database

Perform the following steps to convert a physical standby database to a snapshot standby database:

  1. To convert a physical standby database to a snapshot standby database, flashback should be enabled and the database should be brought to the MOUNT status after cancelling recovery as follows:
    SQL> select open_mode,database_role,flashback_on from v$database;
    OPEN_MODE            DATABASE_ROLE    FLASHBACK_ON
    -------------------- ---------------- ------------------
    MOUNTED              PHYSICAL STANDBY YES
  2. Now process the following command to convert the physical standby database to a snapshot standby database:
    SQL> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
    Database altered.
    SQL> 
    Wed Nov 07 20:10:27 2012
    ALTER DATABASE CONVERT TO SNAPSHOT STANDBY
    Created guaranteed restore point SNAPSHOT_STANDBY_REQUIRED_11/07/2012 20:10:27
    ........
    Standby became primary SCN: 3938237
    Wed Nov 07 20:10:29 2012
    Setting recovery target incarnation to 3
    CONVERT TO SNAPSHOT STANDBY: Complete - Database mounted as snapshot standby
    Completed: ALTER DATABASE CONVERT TO SNAPSHOT STANDBY
    
  3. Internally, a standby database creates a restore point so that we can convert the snapshot standby database to a physical standby database at any time, and the standby database will be converted as a primary with a new incarnation as follows:
    SQL> select open_mode,database_role,resetlogs_change#,prior_resetlogs_change# from v$database;
    OPEN_MODE  DATABASE_ROLE  RESETLOGS_CHANGE# PRIOR_RESETLOGS_CHANGE#
    ---------- ---------------- ---------------- ---------------------
    MOUNTED    SNAPSHOT STANDBY        3938240                945184
  4. After successful conversion, you can now validate the snapshot standby database as follows:
    SQL> select name,restore_point_time from v$restore_point;
    NAME                                           RESTORE_POINT_TIME
    ------------------------------------------   ---------------- ---
    SNAPSHOT_STANDBY_REQUIRED_11/07/2012 20:10:27  08.10.27.000000000 PM

Even though the old standby database is converted to a snapshot standby database, the archives will be received from the primary database whenever log switch occurs, and note that the database will be in the MOUNT status after conversion as follows:

Wed Nov 07 21:07:27 2012
RFS[5]: Selected log 11 for thread 1 sequence 619 dbid 1316772835 branch 788992101
Wed Nov 07 21:07:27 2012
Archived Log entry 14 added for thread 1 sequence 618 ID 0x4eede1f7 dest 1:

You have to explicitly open the database so that it will be ready for read and write purposes.

What just happened?

We've just revised how to convert a database from a physical standby to a snapshot standby using the SQL* Plus command using a step-by-step approach.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.22.145