Wednesday, April 21, 2010

Steps to Follow for RMDC Box while bringing down nd bringing up

Steps to Follow for RMDC Box

###########################################################

Procedure to be followed on an environment that is having DR system

(to keep standby DB at RM fine and in synch) :-

At the Primary DB site (ADC)

============================
1 - With the outage start and after shutting down the MT

2 - Force archiving of current redo logs :-
    SQL> alter system archive log current;

    (Note : in case of RAC, issue this statement from each RAC node)

3 - Check current archive logs on primary DB and save the output for reference using :-

    SQL> set linesize 100
    SQL> col name format a50

    SQL> select name,THREAD#,SEQUENCE#,Applied,to_char(COMPLETION_TIME,'yyyy/mm/dd hh24:mi:ss')

         from V$archived_log where (THREAD#,RECID) in (select THREAD#,max(RECID)

         from V$archived_log where APPLIED='YES' group by THREAD#);

4 - Shutdown primary DB and you can proceed with primary env cold snap


At the DR (Standby) site (RM)
=============================

7 - Cancel the managed recovery at the DR DB and get all pending archivelogs applied

    sqlplus " / as sysdba"

    SQL> alter database recover managed standby database cancel;

    SQL> recover standby database until cancel;
    AUTO

    Enter "AUTO" for automatic archivelog files picking

    (Note : in case of RAC, at DR site, only one DB instance is running in managed recovery mode)

8 - When all pending archivelogs are applied check current archivelogs status using :-

    SQL> set linesize 100
    SQL> col name format a50

    SQL> select name,THREAD#,SEQUENCE#,Applied,to_char(COMPLETION_TIME,'yyyy/mm/dd hh24:mi:ss')

         from V$archived_log where (THREAD#,RECID) in (select THREAD#,max(RECID)

         from V$archived_log where APPLIED='YES' group by THREAD#);

9 - Shutdown standby DB and you can proceed with its cold snap

10 - After cold snaps are completed on both sites, startup the primary DB normally and startup

     the standby DB in managed recovery as follows :-
     SQL> startup nomount;

     SQL> alter database mount standby database;

     At this point put the standby database in managed recovery mode.

     SQL> recover managed standby database disconnect;

11 - Make sure automatic archive shipping and application at standby keeps on going during

     and after planned work. Verify this from V$archived_log

No comments:

Post a Comment