rman auxiliary / log=’rman_dup_DBN1_B.log’ << RMAN_CMD

set echo on

run

{

set newname for database to ‘+DBN1_DATA1’;

set newname for tablespace system to ‘+DBN1_SYSTEM’;

set newname for tablespace sysaux to ‘+DBN1_SYSTEM’;

set newname for tablespace undo1 to ‘+DBN1_SYSTEM’;

set newname for tablespace undo2 to ‘+DBN1_SYSTEM’;

ALLOCATE AUXILIARY CHANNEL d10 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d11 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d12 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d13 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d14 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d15 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d16 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d17 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d18 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d19 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d20 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d21 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d22 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d23 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d24 DEVICE TYPE DISK;

ALLOCATE AUXILIARY CHANNEL d26 DEVICE TYPE DISK;

duplicate database to DBN1 backup location ‘/oracle/dbdump/DBN2’

spfile

set db_unique_name=’DBN1_B’

set instance_number = ‘1’

set filesystemio_options=’NONE’

set disk_asynch_io=’FALSE’

set db_domain=’UK.CENTRICAPLC.COM’

set compatible=’11.2.0.3.0′

set cluster_database=’FALSE’

set log_archive_dest_1=’location=”+DBN1_ARCH01″, valid_for=(ALL_LOGFILES,ALL_ROLES)’

set control_files=’+DBN1_ARCH01/DBN1_b/cntrl1.dbf’,’+DBN1_RECO/DBN1_b/cntrl1.dbf’

set db_create_file_dest=’+DBN1_DATA1′

set db_create_online_log_dest_1=’+DBN1_OLOG’

set db_create_online_log_dest_2=’+DBN1_MLOG’

set db_recovery_file_dest=’+DBN1_RECO’

nofilenamecheck;

}

RMAN_CMD

exit 0