Thursday, July 2, 2015

How to activate the Oracle11g standby database

This exercise was tested in oracle11gR2 version. When primary database went down and database is not coming up with in the expected time frame.  In this scenario, we need to bring the standby up with READ/WRITE mode.

Here is the steps. Login to standby database and run the below steps.

SQL> select open_mode from v$database;

OPEN_MODE
------------------------------------------------------------
READ ONLY WITH APPLY

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;

Database altered.

SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE;

Database altered.

SQL> alter database open;

Database altered.

SQL> select open_mode from v$database;

OPEN_MODE
------------------------------------------------------------
READ WRITE

SQL>


Once activated, then we need rebuild the old primary as a standby database or flash back the database and apply recent archive log files.

No comments: