Total Pageviews

Wednesday 13 April 2011

RMAN Duplicate

Suppose you have to create duplicate database from PROD and you cannot create recovery catalog and connect to target instance also. Then no need to worry in 11GR2 it is possible to create duplicate database without connecting to recovery catalog and target instance.

RMAN>duplicate target database to "ORCL" nofilenamecheck
until time "to_date('31-03-2011 11:44:05','dd-mm-yyyy h24:mi:ss')"
backup location '/software/backup';

For getting the date and time details run below command on PROD.

sql>select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') from dual;

4 comments:

  1. What happens in the backgrond when we run the adpreclone on the database and application side.
    And also what happens when we run the adcfgclone on both the side..
    And what information does the Template contains when we run adpreclone......

    Thanks
    Mohit

    ReplyDelete
  2. What are the various option available while running the adpreclone and adcfgclone and what are the diffrence between them.....

    ReplyDelete
  3. Hi Mohit,

    Sorry for late reply. Please find the answer below of your first question.

    adpreclone.pl dbTier run in two steps Techstack and database.

    Techstack:
    It will create following directories in the ORACLE_HOME/appsutil/clone
    Jlib, db, data where “Jlib” relates to libraries “db” will contain the techstack information, “data” will contain the information related to datafiles and required for cloning.
    Creates driver files at ORACLE_HOME/appsutil/driver/instconf.drv

    Converts inventory from binary to xml, the xml file is located at $ORACLE_HOME/appsutil/clone/context/db/Sid_context.xml

    Prepare database for cloning:
    This includes creating datbase control file script and datafile location information file at
    $ORACLE_HOME/appsutil/template
    adcrdbclone.sql, dbfinfo.lst

    Generates database creation driver file at ORACLE_HOME/appsutil/clone/data/driver
    data.drv

    Copy JDBC Libraries at ORACLE_HOME/appsutil/clone/jlib/classes12.jar and appsoui

    When Running adpreclone appsTier

    This will create stage directory at $COMMON_TOP/clone. This also run in two steps.

    Techstack:
    Creates template files for
    Oracle_iAS_Home/appsutil/template
    Oracle_806_Home/appsutil/template

    Creates Techstack driver files for
    IAS_ORACLE_HOME/appsutil/driver/instconf.drv
    806_ORACLE_HOME/appsutil/driver/instconf.drv

    APPL_TOP preparation:
    -It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv
    -Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip

    ++++++++++++++++++++++++++++++++++

    When you run adcfgclone.pl dbTier then below things is done in backend.

    dbTier for configuring techstack

    adchkutl.sh — This will check the system for ld, ar, cc, and make versions.
    adclonectx.pl — This will clone the context file. This will ceate a new context file as per the details of this instance.
    runInstallConfigDriver — located in $Oracle_Home/appsutil/driver/instconf.drv
    Relinking $Oracle_Home/appsutil/install/adlnkoh.sh — This will relink ORACLE_HOME

    For data on database side, following scripts are run
    Driver file $Oracle_Home/appsutil/clone/context/data/driver/data.drv
    Create database adcrdb.zip
    Autoconfig is run
    Control file creation adcrdbclone.sql

    and when you run adcfgclone.pl appstier--

    Creates context file for target adclonectx.pl

    Run driver files
    $ORACLE_HOME/appsutil/driver/instconf.drv
    $IAS_ORACLE_HOME/appsutil/driver/instconf.drv

    Relinking of Oracle Home$ORACLE_HOME/bin/adlnk806.sh$IAS_ORACLE_HOME/bin/adlnkiAS.sh
    At the end it will run the driver file $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.

    ReplyDelete
  4. Hi Mohit,

    There is no other option with adpreclone.pl except dbtier and appsTier.

    But with adcfgclone.pl you can use some options like dbtier,dbTechStack,xml file

    I would sugget you just tun adcfgclone.pl wihotu using any option it will show you what option you can use.

    Regards
    Devesh

    ReplyDelete