This discussion is archived
4 Replies Latest reply: Mar 26, 2013 7:14 AM by 977635 RSS

moving entire DG database files:   which one first?

977635 Newbie
Currently Being Moderated
Hi everyone,

Oracle 11.2 DG w/broker on Sun Solaris 10

I'm going to be migrating both our primary and standby databases from one set of existing mount points, to another set of new mount points.

Which one should I do first, (and why)? Primary or standby?

My thought was to shutdown standby and move primary, then bring up standby to mount and cancel managed recovery mode, and move all of its files.

Your thoughts please...
  • 1. Re: moving entire DG database files:   which one first?
    mseberg Guru
    Currently Being Moderated
    Hello;

    Won't matter. I might do the Standby and let it catch up after the move, then do the Primary.

    Did this last summer using SCP. I deferred the Primary and then it shutdown. If you want to move them cold and the directory structure is the same you can use this :
    set heading off
    set feedback off
    set pagesize 100
    set linesize 400
     
     
     
    select 'scp '||a.name ||' server_name:' || a.name as newname from v$datafile a;
     
     
     
     
    select 'scp '||a.name ||' server_name:' || a.name as newname from v$controlfile a;
     
     
    select 'scp '||a.member ||' server_name:' || a.member as newname from v$logfile a;
    When I moved mine I did a DEFER then shutdown and moved the standby first. The log catch allowed me to test listener, tnsnames on the Standby before moving the Primary. This leaves less pieces to test on the Primary side.

    Best Regards

    mseberg
  • 2. Re: moving entire DG database files:   which one first?
    977635 Newbie
    Currently Being Moderated
    So, let me get this straight.

    You would set dest_2_state to deferred on primary,
    then shut down standby and copy/move the files,
    then bring up standby to mount, alter db rename files,
    then enable primary again and start managed recovery on the standby,
    (and test everything at this point leaving standby_file_management=manual until both databases are moved).

    Then, with a working standby (in the new location),
    set dest_2_state on the primary to deferred again,
    and shut down primary, copy/move the files,
    bring it up to mount state,
    alter db rename files,
    then open the primary and set dest_2_state to enable again.

    Then, test and pray. :-)

    Is this about right?
  • 3. Re: moving entire DG database files:   which one first?
    mseberg Guru
    Currently Being Moderated
    Yes.

    If at all possible I would keep the directory structure the same as before.

    I would also move my tnsnames.ora, Listener.ora, password files from both servers and INIT/Spfiles.

    Best Regards

    mseberg
  • 4. Re: moving entire DG database files:   which one first?
    977635 Newbie
    Currently Being Moderated
    Thanks mseberg. Unfortunately, the original configuration is a mess and needs to be cleaned up in this process.
    I've already written the dynamic sql scripts to generate most of the file moves (copies), so the hard part is done.
    It is just a very fragile process and of course, this is a critical production environment with no test environment in place.

Legend

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