Duplicate db using RMAN script

################################################
#
# Compatible: Oracle 8i 9i 10g 11g
#
################################################
#
# Duplicate a database until time…
# Database must be in « startup nomount » mode
#
################################################


connect catalog rman/****@rman
connect target sys/****@****.world
connect auxiliary / ;
run {
        set until time= "to_date('25/08/2009 06:18:01','dd/mm/yyyy hh24:mi:ss')";

        # if restoring from tape (else Allocate type disk):
        allocate channel ch1 type 'sbt_tape' parms 'ENV=(NSR_SERVER=*****,NSR_DATA_VOLUME_POOL=*****,NSR_CLIENT=*****)';
        allocate auxiliary channel aux1  type 'sbt_tape' parms 'ENV=(NSR_SERVER=*****,NSR_DATA_VOLUME_POOL=*****,NSR_CLIENT=*****)';
        duplicate target database to MYNEWDB nofilenamecheck;
        release channel ch1;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.