Thursday, November 8, 2012

Change on Redo Logs on a Data Guard Configuration

Some times for perfomance reason there is a need to recreate the Online Redo logs on the primary database. Based on Oracles recomendation  there should exist also Stanby Redo Log files which will need also to be recreated. If you do not recreate a new control file fo the standby you compromise the DG configuration. So here are the steps for this operation (10g & 11g):

1. Find the location of the control files , Standby and Online Redo Log files on standby and check if the db_file_name_convert & log_file_name_convert has been set.

     As sysdba on standby issue (using SQLPLUS) :

     show parameter control_files
     show parameter db_file_name_convert
     show parameter log_file_name_convert
     select * from v$logfile

2. Shutdown the stanby database.

3. Make all the changes related to the Online and Standby Redo log Groups in the Primary Database.

4. Drop all  old Online and Standby Redo log Groups from the Standby Database.

5. Recreate the Standby Controlfile

    a. On primary as sysdba issue :
        alter database create standby controlfile as '/tmp/myfile';

    b. Transfer the new control file to location of the control files to the standby server

    c. With the Standby Database still down drop the old control files and rename the new one to the same    name(s)
    d. Mount the standby database
        startup mount

    e. Switch Flashback off on standby if has been enabled (If you are in a Fast FailOver Configuration it will be enabled)
        alter database flashback off;

    e. Wait a few minutes for the standby to clear the online redo logfiles and recreate everything on the correct locations

    g. If you do not have set the  db_file_name_convert & log_file_name_convert  parameters  you must manulally rename all files

    h. Stop Managed Recovery
        alter database recover managed standby database cancel;

    i. Re-Enable FlashBack Database and restart database
       alter database flashback on;
       shutdown immediate;

And you are again in sync.
Oracle Support Notes : 740675.1 & 459411.1

No comments:

Post a Comment