Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: CONDB (DBID=1075048777)
auxiliary database Password:
connected to auxiliary database: AUXDB (not mounted)
RMAN> RUN
{
SET NEWNAME FOR DATABASE TO '/dbs/AUXDB/%U';
DUPLICATE TARGET DATABASE TO AUXDB PLUGGABLE DATABASE PDB FROM ACTIVE DATABASE NOFILENAMECHECK;
}2> 3> 4> 5>
executing command: SET NEWNAME
Starting Duplicate Db at 02-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
current log archived
contents of Memory Script:
{
sql clone "alter system set db_name =
''CONDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name =
''AUXDB'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone from service 'CONDB' primary controlfile;
alter clone database mount;
}
executing Memory Script
sql statement: alter system set db_name = ''CONDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set db_unique_name = ''AUXDB'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area 417546240 bytes
Fixed Size 2289064 bytes
Variable Size 255853144 bytes
Database Buffers 155189248 bytes
Redo Buffers 4214784 bytes
Starting restore at 02-JUL-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/dbs/AUXDB/control01.ctl
output file name=/fra/AUXDB/control02.ctl
Finished restore at 02-JUL-13
database mounted
Skipping pluggable database SALESPDB
Skipping pluggable database PDB1
Skipping pluggable database ORA12C
Automatically adding tablespace SYSTEM
Automatically adding tablespace SYSAUX
Automatically adding tablespace PDB$SEED:SYSTEM
Automatically adding tablespace PDB$SEED:SYSAUX
Automatically adding tablespace UNDOTBS1
Skipping tablespace USERS
contents of Memory Script:
{
set newname for datafile 1 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1";
set newname for datafile 3 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3";
set newname for datafile 4 to
"/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4";
set newname for datafile 5 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5";
set newname for datafile 7 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7";
set newname for datafile 8 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8";
set newname for datafile 9 to
"/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9";
set newname for datafile 10 to
"/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10";
set newname for datafile 11 to
"/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11";
set newname for datafile 19 to
"/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19";
set newname for datafile 22 to
"/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22";
restore
from service 'CONDB' clone database
skip forever tablespace "USERS",
"SALESPDB":"SYSTEM",
"SALESPDB":"SYSAUX",
"SALESPDB":"SALES",
"PDB1":"SYSTEM",
"PDB1":"SYSAUX",
"PDB1":"PDB1",
"ORA12C":"USERS",
"ORA12C":"SYSTEM",
"ORA12C":"SYSAUX",
"ORA12C":"EXAMPLE" ;
sql 'alter system archive log current';
}
executing Memory Script
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
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 02-JUL-13
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00003 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00004 to /dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00005 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:16
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00008 to /dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00009 to /dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:25
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00010 to /dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00011 to /dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00019 to /dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00022 to /dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-JUL-13
sql statement: alter system archive log current
current log archived
contents of Memory Script:
{
restore clone force from service 'CONDB'
archivelog from scn 2616072;
switch clone datafile all;
}
executing Memory Script
Starting restore at 02-JUL-13
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=21
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: using network backup set from service CONDB
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=22
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 02-JUL-13
datafile 1 switched to datafile copy
input datafile copy RECID=18 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1
datafile 3 switched to datafile copy
input datafile copy RECID=19 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
datafile 4 switched to datafile copy
input datafile copy RECID=20 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
datafile 5 switched to datafile copy
input datafile copy RECID=21 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5
datafile 7 switched to datafile copy
input datafile copy RECID=22 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
datafile 8 switched to datafile copy
input datafile copy RECID=23 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8
datafile 9 switched to datafile copy
input datafile copy RECID=24 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
datafile 10 switched to datafile copy
input datafile copy RECID=25 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
datafile 11 switched to datafile copy
input datafile copy RECID=26 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
datafile 19 switched to datafile copy
input datafile copy RECID=27 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
datafile 22 switched to datafile copy
input datafile copy RECID=28 STAMP=819682983 file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22
contents of Memory Script:
{
set until scn 2616267;
recover
clone database
skip forever tablespace "USERS",
"SALESPDB":"SYSTEM",
"SALESPDB":"SYSAUX",
"SALESPDB":"SALES",
"PDB1":"SYSTEM",
"PDB1":"SYSAUX",
"PDB1":"PDB1",
"ORA12C":"USERS",
"ORA12C":"SYSTEM",
"ORA12C":"SYSAUX",
"ORA12C":"EXAMPLE" delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 02-JUL-13
using channel ORA_AUX_DISK_1
Executing: alter database datafile 6 offline drop
Executing: alter database datafile 15 offline drop
Executing: alter database datafile 16 offline drop
Executing: alter database datafile 17 offline drop
Executing: alter database datafile 23 offline drop
Executing: alter database datafile 24 offline drop
Executing: alter database datafile 25 offline drop
Executing: alter database datafile 40 offline drop
Executing: alter database datafile 38 offline drop
Executing: alter database datafile 39 offline drop
Executing: alter database datafile 41 offline drop
starting media recovery
archived log for thread 1 with sequence 21 is already on disk as file /fra/AUXDB/archivelog/2013_07_02/o1_mf_1_21_8x3rpf5j_.arc
archived log for thread 1 with sequence 22 is already on disk as file /fra/AUXDB/archivelog/2013_07_02/o1_mf_1_22_8x3rpg7h_.arc
archived log file name=/fra/AUXDB/archivelog/2013_07_02/o1_mf_1_21_8x3rpf5j_.arc thread=1 sequence=21
archived log file name=/fra/AUXDB/archivelog/2013_07_02/o1_mf_1_22_8x3rpg7h_.arc thread=1 sequence=22
media recovery complete, elapsed time: 00:00:00
Finished recover at 02-JUL-13
Oracle instance started
Total System Global Area 417546240 bytes
Fixed Size 2289064 bytes
Variable Size 255853144 bytes
Database Buffers 155189248 bytes
Redo Buffers 4214784 bytes
contents of Memory Script:
{
sql clone "alter system set db_name =
''AUXDB'' comment=
''Reset to original value by RMAN'' scope=spfile";
sql clone "alter system reset db_unique_name scope=spfile";
}
executing Memory Script
sql statement: alter system set db_name = ''AUXDB'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset db_unique_name scope=spfile
Oracle instance started
Total System Global Area 417546240 bytes
Fixed Size 2289064 bytes
Variable Size 255853144 bytes
Database Buffers 155189248 bytes
Redo Buffers 4214784 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUXDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 SIZE 50 M ,
GROUP 2 SIZE 50 M ,
GROUP 3 SIZE 50 M
DATAFILE
'/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-1',
'/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-5',
'/dbs/AUXDB/data_D-AUXDB_TS-SYSTEM_FNO-8'
CHARACTER SET WE8MSWIN1252
contents of Memory Script:
{
set newname for tempfile 1 to
"/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-1";
set newname for tempfile 2 to
"/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-2";
set newname for tempfile 3 to
"/dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-3";
switch clone tempfile all;
catalog clone datafilecopy "/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3",
"/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4",
"/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7",
"/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9",
"/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10",
"/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11",
"/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19",
"/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-1 in control file
renamed tempfile 2 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-2 in control file
renamed tempfile 3 to /dbs/AUXDB/data_D-AUXDB_TS-TEMP_FNO-3 in control file
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3 RECID=1 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4 RECID=2 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7 RECID=3 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9 RECID=4 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10 RECID=5 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11 RECID=6 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19 RECID=7 STAMP=819682999
cataloged datafile copy
datafile copy file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22 RECID=8 STAMP=819682999
datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-3
datafile 4 switched to datafile copy
input datafile copy RECID=2 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-UNDOTBS1_FNO-4
datafile 7 switched to datafile copy
input datafile copy RECID=3 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-7
datafile 9 switched to datafile copy
input datafile copy RECID=4 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-SYSAUX_FNO-9
datafile 10 switched to datafile copy
input datafile copy RECID=5 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-USERS_FNO-10
datafile 11 switched to datafile copy
input datafile copy RECID=6 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-EXAMPLE_FNO-11
datafile 19 switched to datafile copy
input datafile copy RECID=7 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-ROOT_CDB_FNO-19
datafile 22 switched to datafile copy
input datafile copy RECID=8 STAMP=819682999 file name=/dbs/AUXDB/data_D-AUXDB_TS-TS_PDB_FNO-22
contents of Memory Script:
{
Alter clone database open resetlogs;
}
executing Memory Script
database opened
Executing: drop pluggable database "SALESPDB"
Executing: drop pluggable database "PDB1"
Executing: drop pluggable database "ORA12C"
contents of Memory Script:
{
sql clone "alter pluggable database all open";
}
executing Memory Script
sql statement: alter pluggable database all open
Dropping offline and skipped tablespaces
Executing: alter database default tablespace system
Executing: drop tablespace "USERS" including contents cascade constraints
Finished Duplicate Db at 02-JUL-13
To verify:
SQL> SELECT NAME,CDB,OPEN_MODE FROM V$DATABASE;
NAME CDB OPEN_MODE
--------- --- --------------------
AUXDB YES READ WRITE
SQL> SELECT NAME,OPEN_MODE FROM V$PDBS;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB READ WRITE