Tuesday 28 July 2015

Failover-Role Transition-Oracle DataGuard-Manual Steps

   Failover-Role Transition-Oracle DataGuard-Manual Steps



Oracle Dataguard is part of Oracle High Availability Solution and widely used for disaster recovery of oracle database. There are two types of role transition available with oracle dataguard. One is Switch Over and another is Fail Over. Failover is basically unplanned role transition while Fast Start Failover is enabled. But if First Start Failover is not enabled then automatic failover is not possible. You can use following steps for manual failover. This is applicable for physical standby database.

Step-1:


On Primary database:-

Flush all primary database currently generated redo data to standby.

SQL> alter system flush redo to target_db_name(standby);


Step-2:

Verify that primary and standby database log sequence is same that is all redo sent from primary database are applied to standby database.


SQL> select unique thread# as thread,MAX(SEQUENCE#) over (PARTITION BY THREAD)            as LAST from V$ARCHIVED_LOG;

Check for gap.


Step-3:

Stop redo apply on standby database:

SQL> alter database recover managed standby database cancel;


Step-4:

Switch the physical standby database to primary role:

SQL> alter database failover to standby;



Step-5:

Open new primary database;


Step-6:

Backup the new primary database.

No comments:

Post a Comment