Tuesday, June 4, 2013

Prerequest check before switchover to physical standby

Verify standby has received all redo from primary

If you are running in Maximum Protection or Maximum Availability mode, running following query on primary database to check if the target of you switchover is synchronized.

SQL> select db_unique_name, protection_mode, synchronization_status, synchronized from v$archive_dest_status;

If Synchronized does not say YES or you are running Maximum Performance mode, running following query on target standby database to get current log sequence that the primary is sending.


SQL> select client_process, process, thread#, sequence#, status from v$managed_standby where client_process = 'LGWR';

CLIENT_P PROCESS      THREAD#  SEQUENCE# STATUS
-------- --------- ---------- ---------- ------------
LGWR     RFS                1        718 IDLE
LGWR     RFS                2         11 IDLE

Running following query on primary database to get the current redo sequence#

SQL> select thread#, sequence#, status from v$log where status = 'CURRENT';

   THREAD#  SEQUENCE# STATUS
---------- ---------- ----------------
         1        718 CURRENT
         2         11 CURRENT

You can not switchover if standby is not receiving the current redo.


Check the apply is caught up.

Running following query on target standby database, make sure status fo MRP0 is "APPLYING_LOG"


SQL> select inst_id, client_process, process, thread#, sequence#, status from gv$managed_standby where process like 'MRP%';

   INST_ID CLIENT_P PROCESS      THREAD#  SEQUENCE# STATUS
---------- -------- --------- ---------- ---------- ------------
         1 N/A      MRP0               1        718 APPLYING_LOG


Stop Rman backup and cancel jobs

No comments:

Post a Comment