1.1.6 setup listener and tnsnames
on 133
vi tnsnames.ora
add:
PROD4_oelr5u8-1=
(description=
(address=(protocol=tcp)(host=oelr5u8-1)(port=1521))
(connect_data=
(server=dedicated)
(service_name=PROD4)
)
)
on 131
vi listener.ora
add into sid_list_listener:
(sid_desc=
(global_dbname=PROD4)
(oracle_home=/u01/app/oracle/product/11.2.0/db_1)
(sid_name=PROD4
)
lsnrctl start
vi tnsnames.ora
PROD2_odd-oelr4u8 =
(description =
(address = (protocol = tcp)(host = odd-oelr4u8)(port = 1521))
(connect_data =
(server = dedicated)
(service_name = PROD2)
)
)
1.2 check target database's backup
on 133
ensure that archive log mode is on
rman target /
list backup of database;
note: cannot use backup as compressed backupset... errors will be reported when duplicating
2. duplicate
rman target sys/oracle@PROD2 auxiliary sys/oracle@PROD4_oelr5u8-1
Recovery Manager: Release 10.2.0.1.0 - Production on Sat Apr 5 15:37:35 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: PROD2 (DBID=1490667694)
connected to auxiliary database: PROD4 (not mounted)
RMAN> duplicate target database to PROD4;
Starting Duplicate Db at 05-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=9 devtype=DISK
contents of Memory Script:
{
set until scn 768912;
set newname for datafile 1 to
"/u01/app/oracle/oradata/PROD4/system01.dbf";
set newname for datafile 2 to
"/u01/app/oracle/oradata/PROD4/undotbs01.dbf";
set newname for datafile 3 to
"/u01/app/oracle/oradata/PROD4/sysaux01.dbf";
set newname for datafile 4 to
"/u01/app/oracle/oradata/PROD4/users01.dbf";
set newname for datafile 5 to
"/u01/app/oracle/oradata/PROD4/mgmt.dbf";
set newname for datafile 6 to
"/u01/app/oracle/oradata/PROD4/mgmt_ecm_depot1.dbf";
set newname for datafile 7 to
"/u01/app/oracle/oradata/PROD4/catalog_tbs01.dbf";
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 05-APR-14
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/PROD4/system01.dbf
restoring datafile 00002 to /u01/app/oracle/oradata/PROD4/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/PROD4/sysaux01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/PROD4/users01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/PROD4/mgmt.dbf
restoring datafile 00006 to /u01/app/oracle/oradata/PROD4/mgmt_ecm_depot1.dbf
restoring datafile 00007 to /u01/app/oracle/oradata/PROD4/catalog_tbs01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/06p4vq2u_1_1
ORA-19870: error while restoring backup piece /u01/app/oracle/product/10.2.0/db_1/dbs/06p4vq2u_1_1
ORA-19505: failed to identify file "/u01/