Tuesday, June 14, 2011

Convert Standby Database to independent operational DB

We had a requirement to convert the existing standby database to an independent one.

This is the steps that we followed to achieve this.

1.Shutdown the primary database consistently.

2.Do a failover on the standby database by issuing the following command.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;

Database altered.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WAIT WITH SESSION SHUTDOWN;

Database altered.

SQL> alter database open ;

Database altered.

In the primary database comment/remove the following parameters:

*.log_archive_config
*.log_archive_dest_2
*.log_archive_dest_state_2='ENABLE'
*.dg_broker_start
*.standby_file_management

The above changes would prevent the log shipping to old standby database and dataguard brocker wont start.

If the "*.dg_broker_start" parameter is set to true, expect the following error while opening the database.

ORA-16649: possible failover to another database prevents this database from
being opened


Once the above changes are made, the database could be started independently.

No comments: