This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Oct 23, 2013 8:46 AM by user8869798 RSS

Cloning to a different SID on a different server

user8869798 Newbie
Currently Being Moderated


Hi,

I need a documentation that will definitely take me through the steps for cloning database A on Server A1 to database B on server B1. The path for FRA on Server A1 is different on Server B1.

Database version is 11gR1

 

thank you.

  • 1. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    I forgot to say 'using RMAN'

     

    thank you.

  • 2. Re: Cloning to a different SID on a different server
    DK2010 Guru
    Currently Being Moderated

    Hi,

     

    You can user the Note ID :Clone a Database With RMAN Without Connecting To Target Database (Doc ID 732624.1)


    Can also check :http://gavinsoorma.com/2013/07/restore-rman-backup-to-another-server-for-testing-disaster-recovery-procedures-as-well-as-for-cloning/

     

    HTH

  • 4. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    Thank you both for your responses, much appreciated.

    The Database version is 11gR1 so the document suggested by DK2010 Doc ID 732624.1 is proving quite useful. I am still working my way through it, hence the delay in updating this discussion.

     

    I am now on the following  item and would appreciate some help please:

     

    6) After database is restored, perform recovery and apply archives which were generated during
    backup using RMAN and then open the database with resetlogs.

     

    Presumably this step consists of 3 small steps as follows:

    a) RMAN> run{RECOVER DATABASE;} - Is this correct?

    b) How do I do this - apply archives which were generated during backup using RMAN

    c) alter database open resetlogs;

     

    Thank you in advance for your help.

  • 5. Re: Cloning to a different SID on a different server
    Paul M. Oracle ACE
    Currently Being Moderated

    a) RMAN> run{RECOVER DATABASE;} - Is this correct?

    Yes.

    b) How do I do this - apply archives which were generated during backup using RMAN

    RECOVER DATABASE command does that. The steps are only two, "RECOVER DATABASE" and "alter database open resetlogs".


    Don't forget to rename redologs (before opening) if paths are different from source.

  • 6. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    Thanks again for being helpful. I have now successfully used the document suggested by DK2010 Doc ID 732624.1 to clone the database on to a different server using same SID and same file names. I now need to be able to use the document to clone to a different SID, filenames and server.

     

    I will update accordingly.

     

    thanks again to you all.

  • 7. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    Hi,

    I thought I updated this discussion yesterday, I can't find the update!!

     

    Anyway, I need help please, I'm struggling a bit with this rman cloning. The document referred to above doesn't seem to have all the information I need for what I want to do. Can anyone outline the steps please or direct me to a document that will definitely outline the steps one by one.

     

    -My database is 11gR1 so an 11gR2 documentation is no good.

    -I need to clone database A on server A1 to database B on server B1.

    -Database File path locations are the same on both servers but they are named differently, each containing the SID as a suffix.

     

    I want to do this using rman but without connecting to the source database but using backup files.

     

    thank you in advance for your help.


  • 8. Re: Cloning to a different SID on a different server
    1012317 Newbie
    Currently Being Moderated

    if you are using the same os platform this clone could be done via backup of database

    steps

    1) restore backup

    2) recover database

    3) open database in upgrade mode with resetlogs

    4) upgrade the database as usual.

    5) change the the database name with dbnewid.

     

    Regards

    Naresh

  • 9. Re: Cloning to a different SID on a different server
    1012317 Newbie
    Currently Being Moderated

    For Cross platform use datapump, xtts

     

    Regards

    Naresh

  • 10. Re: Cloning to a different SID on a different server
    Paul M. Oracle ACE
    Currently Being Moderated
    The document referred to above doesn't seem to have all the information I need for what I want to do.

     

    Which document are you talking about ? The MOS document posted by DK2010 (Doc ID 732624.1) has everything you may need to restore a database to a different machine, and rename it, if needed as in your case : I can confirm it, because I did the same tens of times, also with upgrade.

  • 11. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    Thanks Paul. Yes, that is the document I'm referring to. Knowing that you have used it successfully to do what I want is a good start, thanks.

     

    Would you be able to help with the following please?:

    1)Export ORACLE_SID=<SID Name as of production>

     

    create init.ora file and give DB_NAME=<dbname of production> and CONTROL_FILES=<location where you want controlfile to be restored>

     

    In source database A, control files are named  /u01/oradata/SIDA/control1_SIDA.ctl,   /u01/oradata/SIDA/control2_SIDA.ctl

    In clone database B, they should be /u01/oradata/SIDB/control1_SIDB.ctl and /u01/oradata/SIDB/control2_SIDB.ctl and this is what I have put in the init.ora file. Is that what I should do or do I keep it same as on source database?

     

    2)Startup an instance in NOMOUNT 

    SQL> Startup nomount pfile=<path of init.ora>;

    This was fine, I started successfully in nomount.

     

    3)Connect to RMAN in NOCATALOG-mode and issue command :

     

      % rman target / nocatalog

    I connected successfully, however


    RMAN> restore controlfile from '<backuppiece of controlfile which you took on production>;

     

    gave an error RMAN-03002: failure of restore command

    RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

     

    I know that the directory /u01/oradata/SIDB/   exists, could it be complaining because I made the change in file path and name in the init.ora file? If that is the case, how do I achieve the control file name change.

     

    I'm stuck here, could you help?

     

    thanks very much in advance.

  • 12. Re: Cloning to a different SID on a different server
    Paul M. Oracle ACE
    Currently Being Moderated

    In source database A, control files are named  /u01/oradata/SIDA/control1_SIDA.ctl,   /u01/oradata/SIDA/control2_SIDA.ctl

    In clone database B, they should be /u01/oradata/SIDB/control1_SIDB.ctl and /u01/oradata/SIDB/control2_SIDB.ctl and this is what I have put in the init.ora file. Is that what I should do or do I keep it same as on source database?

     

    That's correct.

     

    RMAN> restore controlfile from '<backuppiece of controlfile which you took on production>;


    gave an error RMAN-03002: failure of restore command

    RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

     

    Did you copy the controlfile backup on machine B ? and did you provide the exact path to RMAN ? are permissions Ok ? are Operating Systems the same ?

    I know that the directory /u01/oradata/SIDB/   exists

    Does your OS user have the right permissions on it ?

  • 13. Re: Cloning to a different SID on a different server
    user8869798 Newbie
    Currently Being Moderated

    Thanks so much for your help Paul. The problem in step 3 was a typo which I eventually found and corrected. I was then able to proceed on from there.

     

    Step 5:

    RMAN> run {

    set newname for datafile 1 to '/newLocation/system.dbf';

    set newname for datafile 2 to '/newLocation/undotbs.dbf';

    ...

    restore database;

    switch datafile all;

    recover database; } 

     

    As I'm restoring to a different location, I generated a rename file and ran it in the run command and also added the recover database command as shown above. Everything seemed ok until recover database when I got the following error:

    Starting recover at 15-OCT-13
    using channel ORADISK1
    using channel ORADISK2

    starting media recovery

    archived log for thread 1 with sequence 36 is already on disk as file /u01/xxx/xx.log
    unable to find archived log
    archived log thread=1 sequence=35
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 10/15/2013 17:28:14
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 35 and starting SCN of 11908140004913

     

    Should I have renamed the redo log files before doing the recover? I thought I didn't need to do it until I was opening the database?

     

    Thanks again for your help.

     

  • 14. Re: Cloning to a different SID on a different server
    Paul M. Oracle ACE
    Currently Being Moderated

    RMAN-00571: ===========================================================

    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 10/15/2013 17:28:14
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 35 and starting SCN of 11908140004913

     

    Should I have renamed the redo log files before doing the recover? I thought I didn't need to do it until I was opening the database?

    Correct. You need to rename redologs just before opening the DB.

     

    About the error, RMAN continues trying to apply recovering, and when it doesn't find any archivelogs anymore, you get that error, but you should be Ok : rename redologs and open the DB (with resetlogs, of course). 

     

    To avoid the error you should use "until SCN" or "until time" clause, but that's not necessary.

1 2 Previous Next

Legend

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