Clone Oracle10gR2 database-rman duplicate output
Clone of Oracle 10g R2 database -- duplicate output of rman
C: \ Oracle \ product \ 10.2.0 \ client_1 \ BIN> rman target sys/password @ DGP
Recovery MANAGER: Release 10.2.0.1.0-Production on Tuesday January 31 00:59:06 2012
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect to the target database: DG (DBID = 1686618574)
RMAN> connect auxiliary sys/password @ DGS
Connected to secondary Database: DGC (not loaded)
RMAN> duplicate target database to dgc;
Start Duplicate Db from month 1 to Month 12
Use the target database control file to replace the recovery directory
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: sid = 155 devtype = DISK
Memory script content:
{
Set until scn 526998;
Set newname for datafile 1
"/U01/app/oracle/oradata/dgc/system01.dbf ";
Set newname for datafile 2
"/U01/app/oracle/oradata/dgc/undotbs01.dbf ";
Set newname for datafile 3
"/U01/app/oracle/oradata/dgc/sysaux01.dbf ";
Set newname for datafile 4
"/U01/app/oracle/oradata/dgc/users01.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
Start restore from month 1 to Month 12
Use channel ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: recovering the data file backup set
Channel ORA_AUX_DISK_1: Specifies the data file to be recovered from the backup set.
Restoring data file 00001 to/u01/app/oracle/oradata/dgc/system01.dbf
Restoring data file 00002 to/u01/app/oracle/oradata/dgc/undotbs01.dbf
Restoring data file 00003 to/u01/app/oracle/oradata/dgc/sysaux01.dbf
Restoring data file 00004 to/u01/app/oracle/oradata/dgc/users01.dbf
Channel ORA_AUX_DISK_1: Reading the backup segment/home/oracle/all_DG_2.bak
Channel ORA_AUX_DISK_1: recovered backup segment 1
Segment handle =/home/oracle/all_DG_2.bak mark = TAG20120125T110557
Channel ORA_AUX_DISK_1: Recovery completed, time: 00:00:54
The restore is completed from month 1 to Month 12.
SQL statement: CREATE CONTROLFILE REUSE SET DATABASE "DGC" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1 ('/u01/app/oracle/oradata/dgc/redo01.log') SIZE 50 m reuse,
GROUP 2 ('/u01/app/oracle/oradata/dgc/redo02.log') SIZE 50 m reuse,
GROUP 3 ('/u01/app/oracle/oradata/dgc/redo03.log') SIZE 50 M REUSE
DATAFILE
'/U01/app/oracle/oradata/dgc/system01.dbf'
Character set ZHS16GBK
Memory script content:
{
Switch clone datafile all;
}
Executing memory script
,