Rman duplicate target database to
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Rman duplicate target database to

  1. #1
    Join Date
    Jul 2006
    Posts
    195

    Rman duplicate target database to

    Can somebody explain this to me:

    example:
    RMAN> RUN
    {
    SET UNTIL SEQUENCE 11 THREAD 1;
    DUPLICATE TARGET DATABASE TO "clone" NOFILENAMECHECK;
    }

    In particular how do you know what SEQUENCE and THREAD to put into the
    command, is there a query to run.

    Secondly, where will the files be placed Ie control files, system.dbf, redo logs.... or is this just a snippet and there has to be more setup before
    this is run. Ie create init.ora...

    What will the new database name be "clone"

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,480

    Cool Clone of a clone?

    Quote Originally Posted by BeefStu View Post
    Blah, blah, blah...
    In particular how do you know what SEQUENCE and THREAD to put into the
    command, is there a query to run.
    You look it up in the rman backup log or query the backup info in the rman catalog or maybe even V$BACKUP_ARCHIVELOG_DETAILS
    Secondly, where will the files be placed Ie control files, system.dbf, redo logs.... or is this just a snippet and there has to be more setup before
    this is run. Ie create init.ora...
    Files will be placed in the same locations as the source database unless you specify 'SET NEWNAME...' or 'DB_FILE_NAME_CONVERT' (and the log files equivalent).
    What will the new database name be "clone"
    Yes.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    Jul 2006
    Posts
    195
    Whoever is interested this works great!!

    In this example we will assume the source database name to be called "pri" and the the target database, we are creating is to be called "aux" and the "sys" password for aux is "sys"

    1) From the command prompt create a password file for the AUX database.

    orapwd file=$ORACLE_HOME/dbs/orapwaux password=sys entries=5


    2) Create a parameter file from the spfile for the AUX database. Ensure that the ORACLE_SID
    is set to the DB you want to clone.

    sqlplus / AS sysdba

    create pfile='/oracle/10.2.0.1.0/dbs/initaux.ora' from spfile;

    3) Edit the file /oracle/10.2.0.1.0/dbs/initaux.ora;
    change all occurrences of "pri" to "aux". Next change db_name and instance_name to aux.

    Then add the following two lines to the parameter file:

    db_file_name_convert=('/oracle/data/pri','/oracle/data/aux')
    log_file_name_convert=('/oracle/data/pri','/oracle/data/aux')


    4) create the following directories mkdir udump arch bdump audit cdump

    5) Edit tnsnames.ora and listener.ora files to add the AUX entry

    6. Shutdown and startup the listener.ora. From the command prompt type the follow:

    lsnrctl stop

    lsnrctl start

    7) From RMAN, type the following commands.

    RMAN
    CONNECT AUXILIARY SYS/SYS@GOLD_AUX
    CONNECT TARGET SYS/SYS@GOLD_AUX
    STARTUP CLONE NOMOUNT FORCE;
    DUPLICATE TARGET DATABASE TO AUX;

    8) Remove the following entries from initaux.ora

    db_file_name_convert=('/oracle/data/pri','/oracle/data/aux')
    log_file_name_convert=('/oracle/data/pri','/oracle/data/aux')

    9) Login into "aux" DB and create and spfile

    create spfile from pfile='/oracle/10.2.0.1.0/dbs/initaux.ora';

    10) Register AUX database with catalog for backups

  4. #4
    Join Date
    Jul 2006
    Posts
    195
    Typo sorru:

    CONNECT TARGET SYS/SYS@GOLD_AUX

    should be

    CONNECT TARGET SYS/SYS@GOLD_PRI

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