RMAN cloning script
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: RMAN cloning script

  1. #1
    Join Date
    Jan 2001
    Posts
    2,828

    RMAN cloning script

    Hi Folks

    I need to devlop a RMAN cloning strategy.My idea is to do this

    1)Create a RMAN backup on the source system say at /oradumps destination

    2)scp the backups to the clone host at /oradumps destination

    3)startup nomount the clone database

    4)rman target sys/hrishy auxiliary sys/hrishy@clonedb

    5)
    Code:
    run { 
    	allocate auxiliary channel ch1 type 'disk'; 
    	duplicate target database to clonedb
    	nofilenamecheck; 
    	}
    now will this work ?

    regards
    Hrishy

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    You need the archlogs as well, these must span the backup process and go up to the time you wish to "synchronise" to.

    By default it will try to bring your clone up to date with the source db - having the right archlogs in place can be problematic, so I have:

    SET NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS

    before running RMAN, and my first RMAN command is:

    set until time '19-MAY-2005 21:55:00';
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  3. #3
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Dapi

    Thanks for your inputs /Do you have a shell script kind of a thing that prompts a user and then goes on to create the RMAN script dynamically ?

    regards
    Hrishy

  4. #4
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Oh NO! It's all done with a hammer and chisel in Scottish granite
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  5. #5
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Dapi

    I was thinking on the lines of the new oracle enterprise managers functinality to clone a database :-).

    well dapi will my strategy work ? or do i need to take help of the netbackup guys here ?

    regards
    Hrishy

  6. #6
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    That looks like what I do.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  7. #7
    Join Date
    Jan 2001
    Posts
    2,828
    Hi dapi

    I am more concerned about step 2.

    2)scp the backups to the clone host at /oradumps destination

    now when i start up the clone database instance and set the SET NLS_DATE_FORMAT=DD-MON-YYYY HH24:MI:SS

    and then restore the controlfile

    Code:
    run{ 
          allocate channel c1 type disk; 
          restore controlfile; 
        } 
    alter database mount; 
    
    and then run 
    
    run { 
     
         allocate channel c1 type disk; 
         allocate channel c2 type disk; 
         allocate channel c3 type disk; 
    restore database 
    
    }
    I think i cannot use the duplicate command here or can i ?

    regards
    Hrishy

  8. #8
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    I also have some confusion about the docs

    http://download-west.oracle.com/docs...pdb.htm#442271

    where it states that i can just run duplicate command and the database would be clones .The question is how RMAN transfer the backup set to the remote host ?

    regards
    Hrishy

  9. #9
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    If the two machines have the same directory structure - then YOU copy backup files & archlogs to the corresponding place on the "auxiliary" machine and execute RMAN (set until, allocate and duplicate). I'm pretty sure that RMAN duplicate creates the control file for you. All you need to create is a pfile.

    (If you do a restore it will have the same db_name.)
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  10. #10
    Join Date
    Jan 2001
    Posts
    2,828
    Hi Dapi

    I had a look at metalink and came up with this note Note:259767.1

    was just wundering what was the intention behind using
    RMAN Duplication from tape backup using the Oracle disk API

    regards
    Hrishy
    Last edited by hrishy; 05-23-2005 at 01:08 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width