Saturday, September 25, 2021

Convert the Standby to a Snapshot Standby in EBSR12

Convert the Standby to a Snapshot Standby in EBSR12 


Convert the Standby to a Snapshot Standby

  1. The first step is to configure the physical standby database to use flashback logging for flashback database operations.
  2. A flashback database requires that the flashback logs reside in the Flash Recovery Area (FRA). Although the FRA may already be configured for your environment, the flashback logs can significantly increase FRA usage. It is not unheard of to double the size of the FRA to utilize flashback database, and so you need to take this into account.
    SQL> alter system set db_recovery_file_dest_size=32g scope=both;
    SQL> alter system set db_recovery_file_dest='<shared location>' scope=both;
    SQL> alter system set db_flashback_retention_target=1440 scope=both;

    Substitute an appropriate destination size for your system.

  3. Stop redo apply on the physical standby database:
    SQL> alter database recover managed standby database cancel;
  4. Turn on flashback logging:
    SQL> alter database flashback on;
  5. Convert the standby database into a snapshot standby database:
    Note: On Oracle RAC systems, shut down all other instances except one, which is the one you will be using to execute the following command.
    SQL> alter database convert to snapshot standby;
  6. Shut down the snapshot standby database and startup the database (it will be opened for read/write access):
    SQL> shutdown immediate;
    SQL> startup

Revert the Physical Standby Database to its Original State

  1. Change the standby database from snapshot mode back into standby mode using the following commands:
    Note: On Oracle RAC systems, shut down all except the main instance before running the following commands:
    SQL> startup mount force;
    SQL> alter database convert to physical standby;
    SQL> shutdown immediate;
    SQL> startup nomount;
    SQL> alter database mount standby database;
    Note: On Oracle RAC systems, restart all of the remaining Oracle RAC instances in mount mode.

  2. Enable redo log apply:
    SQL> alter database recover managed standby database disconnect from session;

No comments: