Time for action – making a physical standby database environment ready for conversion

You can perform the following steps to make a physical standby database environment ready for conversion:

  1. Stop the media recovery on the physical standby with the following statement:
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    
    Database altered.
  2. In order to prepare the primary database for possible switchovers with the logical standby in future, we will make some changes on the archival initialization parameters. This step is optional and if you don't plan any switchovers between the primary and logical standby in the future, you can skip this step. Run the following statements on the primary database to change the parameters:
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/archive VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=TURKEY_UN' SCOPE=BOTH;
    
    System altered.
    
    SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='LOCATION=/u01/app/oracle/archive_std VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE) DB_UNIQUE_NAME=TURKEY_UN' SCOPE=BOTH;
    
    System altered.

    In this configuration LOG_ARCHIVE_DEST_1 will archive the online logfiles to the archived logfiles even if the database is primary or logical standby (ALL_ROLES option). After a switchover when the database role is logical standby, this setting will archive the local online redo logfiles and not the standby redo logs. It will be filled with the redo transferred from primary.

    The LOG_ARCHIVE_DEST_3 parameter (not set in physical standby Data Guard configuration) will be omitted when the database is primary (STANDBY_ROLE option). If the database role is logical standby, this parameter will archive the standby redo logs that contain redo generated and sent by the primary database.

    There is already LOG_ARCHIVE_DEST_2 defined on the primary database that sends redo to the standby. We are not going to change this parameter. The value of this parameter should resemble the following:

    SERVICE=INDIA LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=INDIA_UN
  3. Execute the following statement on the primary database to make it ready to support a logical standby configuration. This package enables supplementary logging on the primary database, which ensures that the updates contain enough information to identify each modified row. It also builds the LogMiner dictionary and identifies the SCN that SQL Apply has to start mining redo.
    SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
    
    PL/SQL procedure successfully completed.

    Tip

    If the database version is 11gR2, the supplemental logging information is automatically propagated to any existing physical standby database in the configuration. In earlier releases, we must enable supplemental logging on the physical standby database, if we're going to switchover to a physical standby database. Otherwise, after the switchover, the new primary database will not be able to properly feed the logical standby database with redo.

  4. If the physical standby is RAC, you must convert it to a single instance before the logical database conversion. Use the following statements for this purpose:
    SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE;
    SQL> SHUTDOWN ABORT;
    SQL> STARTUP MOUNT EXCLUSIVE;

What just happened?

We're now ready to continue with the conversion of the standby database from physical to logical.

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

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