This discussion is archived
3 Replies Latest reply: Feb 12, 2013 7:33 PM by 966684 RSS

Reconfiguring Physical Standby

966684 Newbie
Currently Being Moderated
Hi All,

Using Oracle 11gR2 on RHEL 5.6. Already have an existing DG environment in absolute sync.

In DR, initially we don't have a SAN and was running on local disk. Since the DR is running out of space we plan to buy a new SAN Storage.

Now once we plug in the new SAN what steps (step/step) do we need to bring up the DG on the new SAN. Also my Primary and DG have different mount points.
  • 1. Re: Reconfiguring Physical Standby
    CKPT Guru
    Currently Being Moderated
    Using Oracle 11gR2 on RHEL 5.6. Already have an existing DG environment in absolute sync.
    In DR, initially we don't have a SAN and was running on local disk. Since the DR is running out of space we plan to buy a new SAN Storage.
    Now once we plug in the new SAN what steps (step/step) do we need to bring up the DG on the new SAN. Also my Primary and DG have different mount points.
    Manually you have to do much steps, If your database size is small then try to duplicate from primary database. Lets suppose it is not allowed then do as follows.

    1) Once it is synchronized then cancel MRP and shutdown the database.
    2) If your control file location is same, then no need of this step, If you are moving even the controlfiles then copy the control file to new location and change the parameter "control_files" value in PFILE/SPFILE and then MOUNT the database
    3) Now Copy all the datafiles to the new mount point(SAN)
    4) Now rename those files as below, you have to perform below step for all the datafiles.
    SQL> alter database rename file 'old location' to 'new location';
    -- You can check the latest file location from "SQL> select name from v$datafile;"
    5) If you have even standby redo log files, You can drop them and create new Online/standby redo log groups
    6) Now change the DB_FILE_NAME_CONVERT, LOG_FILE_NAME_CONVERT parameters to point to the new locations.
    7) Start MRP now.

    Let me know if you have any issues during this task.
  • 2. Re: Reconfiguring Physical Standby
    652072 Newbie
    Currently Being Moderated
    As your database available in local storage, I assume it is small in size.. Please follow steps below



    1.Make sure that both databases (Primary and Standby) are in SYNC before proceeding with Storage Migration (Not mandatory, but preferred)

    2.Disable the destination on Primary which is pushing the REDO to standby (ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_<ID>=DEFER SCOPE=BOTH;)

    3.Cancel the Recovery on Standby (ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;)

    4.Login to RMAN on Production, and take the backup of control file and sftp it to the new SAN Disk location on DR (COPY CURRENT CONTROLFILE FOR STANDBY TO '<Disk location on PRIMARY/standby.ctl>' scope=spfile;

    5.Login to RMAN on DR, and take the full backup of Standby database (BACKUP AS COMPRESSED BACKUPSET DATABASE FORMAT '<Backup location>;)

    6.Make the new control file location change available to STANDBY instance by setting CONTROL_FILES Parameter to new SAN Disk (ALTER SYSTEM SET CONTROL_FILES='<SAN location/standby.ctl';

    7.Bring down the Standby Database, and mount it, and make sure that the new change you made to CONTROL_FILES Parameter in tact

    8.Now, restore the backup that you have just taken to the new SAN Disk location using script below

    run
    {
    set newname for datafile A to 'New location on the SAN';
    :
    :
    :
    set newname for datafile Z to 'New location on the SAN';
    restore database;
    switch datafile all;
    }

    9.Put the database in RECOVERY Mode, and do a logical drop of current Standby redo log files, and create them on new San Disk layout If REAL TIME Apply is required.

    10.If database locations are different from Primary to Standby, alter db_file_name_convert and log_file_name_convert (ALTER SYSTEM SET DB_FILE_NAME_CONVERT='Location on the Primary','Location on the Standby' scope=both;)

    11.Finally, Enable the DESTINATION on PRIMARY for REDO Shipping to STANDBY

    Edited by: nagnrik on Jan 31, 2013 8:55 PM
  • 3. Re: Reconfiguring Physical Standby
    966684 Newbie
    Currently Being Moderated
    Hi Nagnrik,

    Sorry for reverting back so late.

    Thanks for the detailed steps. Have a logical question - Why do I need to backup my standby files and restore back (steps 5 & 8) ?
    If the standby is in sync, Can't I migrate my datafiles, redo, archive etc to new SAN location and do a db_file_name_convert/log_file_name_convert and start the standby again.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points