The backup was from a standby database in read only mode with Apply OFF.

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

set echo on

run

{

set newname for database to ‘+DB2_A_DATA1’;

set newname for tablespace D_GGS_1 to ‘+DB2_A_SYSTEM’;

set newname for tablespace system to ‘+DB2_A_SYSTEM’;

set newname for tablespace sysaux to ‘+DB2_A_SYSTEM’;

set newname for tablespace psapundo to ‘+DB2_A_SYSTEM’;

set newname for tablespace psapundo_2 to ‘+DB2_A_SYSTEM’;

set newname for tablespace psapundo_3 to ‘+DB2_A_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 DB2 backup location ‘/oracle/dbdump1/DB1/1/oracle/dbdump/LP1_CHERISHED’

spfile

set db_unique_name=’DB2_A’

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 diagnostic_dest=’/oracle/DB2/saptrace’

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

set audit_file_dest=’/oracle/DB2/saptrace/audit’

set control_files=’+DB2_A_ARCH/DB2_A/cntrlDB2.dbf’,’+DB2_A_DATA1/DB2_A/cntrlDB2.dbf’,’+DB2_A_RECO/DB2_A/cntrlDB2.dbf’

set db_create_file_dest=’+DB2_A_DATA1′

set db_create_online_log_dest_1=’+DB2_A_OLOG’

set db_create_online_log_dest_2=’+DB2_A_MLOG’

set db_recovery_file_dest=’+DB2_A_RECO’

nofilenamecheck

noredo;

}

RMAN_CMD

exit 0