You can perform the following steps to make a physical standby database environment ready for conversion:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; Database altered.
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
SQL> EXECUTE DBMS_LOGSTDBY.BUILD; PL/SQL procedure successfully completed.
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.
SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE; SQL> SHUTDOWN ABORT; SQL> STARTUP MOUNT EXCLUSIVE;