[oracle@yans1 ~]$ rman target / auxiliary sys/tfad04@jssstr
Recovery Manager: Release 10.2.0.3.0 - Production on 星期三 11月 26 14:32:57 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: JSSWEB (DBID=3439008274)
connected to auxiliary database: JSSSTR (not mounted)
RMAN> run{
2> set until scn 192553;
3> duplicate target database to jssstr
4> DB_FILE_NAME_CONVERT=(jssweb,jssstr) LOGFILE
5> ¨/data/oradata/jssstr/redo01.log¨ SIZE 50M,
6> ¨/data/oradata/jssstr/redo02.log¨ SIZE 50M,
7> ¨/data/oradata/jssstr/redo03.log¨ SIZE 50M
8> open restricted;
9> }
executing command: SET until clause
using target database control file instead of recovery catalog
Starting Duplicate Db at 26-11 月-08
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=155 devtype=DISK
contents of Memory Script:
{
set until scn 192553 ;
set newname for datafile 1 to
"/data/oradata/jssstr/system01.dbf";
set newname for datafile 2 to
"/data/oradata/jssstr/undotbs01.dbf";
set newname for datafile 3 to
"/data/oradata/jssstr/sysaux01.dbf";
set newname for datafile 4 to
"/data/oradata/jssstr/users01.dbf";
set newname for datafile 5 to
"/data/oradata/jssstr/strmtbs01.ora";
restore
check readonly
clone database
;
}
executing Memory Script
...............
...................
.........................
contents of Memory Script:
{
sql clone ¨alter system enable restricted session¨;
Alter clone database open resetlogs;
}
executing Memory Script
sql statement: alter system enable restricted session
database opened
Finished Duplicate Db at 26-11 月-08