In this Document APPLIES TO: Oracle Database - Enterprise Edition - Version 12.2.0.1 and later Information in this document applies to any platform. GOAL For duplicate partial database including few tablespaces to new database.This doc is useful incase of specifying(including) only those tablespaces which are needed while duplicate using tape backups.
In this doc one can include only those tablespaces which are needed.By default, RMAN duplicate restores the root and the seed database SYSTEM,SYSAUX tablespace.
After duplicate, new CDB is created with required tabelspaces,root and the seed database SYSTEM,SYSAYX tablespaces are restored by default.
This doc can also useful incase of PITR restore / recovery of Multi Tenant database to extract information from the dropped / truncated tables of specific PDB. SOLUTION NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner. For the purposes of this document, the following fictitious environment is used as an example to describe the procedure: DEST_TNS : Destination database TNS Alias.
DESTCDB : Destination database name (Here DEST_CDB=mypdb).
DEST_PATH : Path of CDB and PDb datafiles in Destination database.
PDB01 : Pluggable database name which needs to be duplicate from source CDB.
ABCD : This is the tablespace_name which is required tablespace for PDB which we inetrested for restore/recover.
BACKUP_LOCATION : Path of Source database backup.
SOURCE_DB_NAME : Source database name
DEST_DB_UNIQUE_NAME : Destination database DB_UNIQUE_NAME
DEST_SID : Destination database ORACLE_SID
SOURCE_DB_UNIQUE_NAME : Source DB_UNIQUE_NAME.
SOURCE_DB_DATAFILE_LOCATION : Path of CDB and PDb datafiles in Destination database. --In destination server ensure client for MML is installed --For ZDLRA ensure : Wallet is created for access source db VPC owner. Valid libra.so copied to destination server Make necessary changes to sqlnet.ora for WALLET_LOCATION On the destination database, add below in parameter file : -- set db_create_file_dest for destination datafile path.
-- set db_create_online_log_dest_1 for destination db Online Redo Log File Path.
-- set DB_UNIQUE_NAME for destination database DB_UNIQUE_NAME.
-- set UNDO_TABLESPACE=<Valid UNDO tablespace name> On the destination server -- set the ORACLE_SID and bring the database to nomount stage
-- restore the spfile from backup and create pfile from it.Here we are doing duplicate of PDB01.
In below example PDB01:ABCD tablespace will get restore. When Duplicate finished, it will only restore root,PDB$SEED,PDB01 pluggable databases and it will skip PDB01:PDB01_USERS tablespace.-- Below is Source Database REPORT SCHEMA RMAN> report schema; using target database control file instead of recovery catalog Report of database schema for database with db_unique_name PRIM19CDB List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 1230 SYSTEM YES /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_system_kw7wtsxt_.dbf 3 1610 SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_sysaux_kw7wt61g_.dbf 5 360 PDB$SEED:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_system_kw7ww02z_.dbf 6 450 PDB$SEED:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_sysaux_kw7wx6to_.dbf 19 300 UNDO_NEW YES /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undo_new_kw7wtcg1_.dbf 115 100 PDB$SEED:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undo_see_kw7wssf8_.dbf 116 100 PDB$SEED:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undotbs1_kw7wt421_.dbf 121 380 PDB01:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_system_kw7wqx0c_.dbf 122 540 PDB01:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_sysaux_kw7ws6d8_.dbf 123 100 PDB01:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undotbs1_kw7wszbx_.dbf 124 100 PDB01:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undo_see_kw7wszcv_.dbf 125 100 USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_users_kw7wqw6s_.dbf 126 100 PDB01:PDB01_USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_pdb01_us_kw7wqx3c_.dbf 127 50 PDB01:ABCD NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_abcd_kw7ws6kg_.dbf 129 1024 PDB01:USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_users_kw7wqwr4_.dbf 130 1600 TESTTBSP NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_orlando_kw7wqw57_.dbf 131 100 PDB01:TEST NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_test_kw7wqwrg_.dbf 145 360 PDB02:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_system_kw8d9ws1_.dbf 146 460 PDB02:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_sysaux_kw8d9ws4_.dbf 147 100 PDB02:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undotbs1_kw8d9ws6_.dbf 148 100 PDB02:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_undo_see_kw8d9ws7_.dbf 149 50 PDB01:TBSP_XTTS NO /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_tbsp_xtt_kx7lzp0h_.dbf List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 300 TEMP 300 /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_temp_krsmjlmb_.tmp 2 200 TEMP 200 /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_temp_krsmjlkw_.tmp 3 100 PDB01:TEMP 100 //<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_temp_kvw8c186_.tmp 4 100 PDB02:TEMP 100 /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_temp_kw8d9ws7_.dbf 7 100 PDB$SEED:TEMP 100 /<SOURCE_DB_DATAFILE_LOCATION>/o1_mf_temp_krtqnhgm_.tmp In destination database need to connect with auxiliary (without target connection).
In below syntax we need to mention Tablespace Name (which are included in RMAN duplicate) with UNDO tablespace_name.
In case of Local UNDO, for required PDB, we need to include all UNDO Tablespacea.
In case of Shared UNDO, for required PDB, we need to include shared UNDO Tablespace. In below example, used "set newname for database".(For ASM, we can give only DISK_GROUP name)
"set newname for database" at RMAN run block will have precedence over init/spfile parameters. RMAN syntax is like below example : rman auxiliary 'sys/XXXX'@DEST_TNS catalog /@<ZDLRA_CONNECT_STRING> <==In case of NON ZDLRA, one can mention catalog user credentials. RMAN> set dbid=XXXX executing command: SET DBID RMAN> run
{
set until time "to_date('XX-XX-XXX XX:XX:XX','dd-mm-yyyy hh24:mi:ss')";
set newname for database to '/<DEST_PATH>/%U';
allocate auxiliary channel c1 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D';
allocate auxiliary channel c2 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D';
allocate auxiliary channel c3 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D';
DUPLICATE DATABASE <SOURCE_DB_NAME> TO <DEST_DB_NAME> pluggable database "cdb$root"
TABLESPACE PDB01:ABCD,PDB01:UNDO_SEED,PDB01:UNDOTBS1;
}
rman auxiliary 'sys/XXX$'@DEST_TNS catalog /@<ZDLRA_CONNECT_STRING> <==In case of NON ZDLRA, one can mention catalog user credentials. set dbid <SOURCE_DBID>; RMAN> set dbid=SOURCE_DBID RMAN> run { set until time "to_date('XX-XX-XXX XX:XX:XX','dd-mm-yyyy hh24:mi:ss')"; set newname for database to '/<DEST_PATH>/%U'; allocate auxiliary channel c1 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D'; allocate auxiliary channel c2 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D'; allocate auxiliary channel c3 type sbt_tape parms "SBT_LIBRARY=/<PATH_OF_libra.so>/libra.so, ENV=(RA_WALLET=location=file:/<WALLET_LOCATION> CREDENTIAL_ALIAS=<ZDLRA_CONNECT_STRING>) " FORMAT '%U_%D'; set newname for database to '/refresh/home/app/19.3.0.0/oracle/oradata/mypdb/%U'; DUPLICATE DATABASE ORCL19CD TO mypdb pluggable database "cdb$root" TABLESPACE PDB01:ABCD,PDB01:UNDO_SEED,PDB01:UNDOTBS1; } allocated channel: c1 channel c1: SID=427 device type=SBT_TAPE channel c1: RA Library (ZDLRA) SID=F3A3D51BCE37768BE0533432410A45CE .. executing command: SET until clause executing command: SET NEWNAME Starting Duplicate Db at contents of Memory Script: { sql clone "create spfile from memory"; } executing Memory Script sql statement: create spfile from memory contents of Memory Script: { shutdown clone immediate; startup clone nomount; } executing Memory Script Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area 838858864 bytes Fixed Size 9140336 bytes Variable Size 226492416 bytes Database Buffers 599785472 bytes Redo Buffers 3440640 bytes allocated channel: c1 channel c1: SID=424 device type=SBT_TAPE channel c1: RA Library (ZDLRA) SID=F3A3D8204274772CE0533432410A3FBC allocated channel: c2 channel c2: SID=428 device type=SBT_TAPE channel c2: RA Library (ZDLRA) SID=F3A3D863598E7736E0533432410AF7B4 allocated channel: c3 ... contents of Memory Script: { set until scn xxxx; sql clone "alter system set db_name = ''<SOURCE_DB_NAME>'' comment= ''Modified by RMAN duplicate'' scope=spfile"; sql clone "alter system set db_unique_name = ''<DEST_DB_UNIQUE_NAME>'' comment= ''Modified by RMAN duplicate'' scope=spfile"; shutdown clone immediate; startup clone force nomount restore clone primary controlfile; alter clone database mount; } executing Memory Script executing command: SET until clause sql statement: alter system set db_name = ''<SOURCE_DB_NAME>'' comment= ''Modified by RMAN duplicate'' scope=spfile sql statement: alter system set db_unique_name = ''<DEST_DB_UNIQUE_NAME>'' comment= ''Modified by RMAN duplicate'' scope=spfile Oracle instance shut down Oracle instance started ... allocated channel: c1 channel c1: SID=424 device type=SBT_TAPE channel c1: RA Library (ZDLRA) SID=F3A3DB6BBD3E77E6E0533432410A32B6 allocated channel: c2 ... Starting restore at channel c1: starting datafile backup set restore channel c1: restoring control file channel c1: reading from backup piece c-3687178233-20230201-04 channel c1: piece handle=c-3687178233-20230201-04 tag=TAG20230201T121032 channel c1: restored backup piece 1 channel c1: restore complete, elapsed time: 00:00:08 output file name=/<DEST_CONTROLFILE_PATH>/control01.ctl output file name=/<DEST_CONTROLFILE_PATH>/control02.ctl Finished restore at database mounted Skipping pluggable database PDB02 Automatically adding tablespace PDB$SEED:SYSTEM Automatically adding tablespace PDB$SEED:SYSAUX Automatically adding tablespace PDB01:SYSTEM Automatically adding tablespace PDB01:SYSAUX Not connected to TARGET or TARGET not open, cannot verify that subset of tablespaces is self-contained Skipping tablespace PDB01:USERS Skipping tablespace PDB01:TEST Skipping tablespace PDB01:TBSP_XTTS Skipping tablespace PDB01:PDB01_USERS Not connected to TARGET, cannot verify that set of tablespaces being duplicated does not have SYS objects contents of Memory Script: { set until scn XXXX; set newname for datafile 1 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-1"; set newname for datafile 3 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-3"; set newname for datafile 5 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-5"; set newname for datafile 6 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-6"; set newname for datafile 19 to "/<DEST_PATH>//data_D-MYPDB_TS-UNDO_NEW_FNO-19"; set newname for datafile 115 to "/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-115"; set newname for datafile 116 to "/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-116"; set newname for datafile 121 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-121"; set newname for datafile 122 to "/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-122"; set newname for datafile 123 to "/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-123"; set newname for datafile 124 to "/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-124"; set newname for datafile 125 to "/<DEST_PATH>//data_D-MYPDB_TS-USERS_FNO-125"; set newname for datafile 127 to "/<DEST_PATH>//data_D-MYPDB_TS-ABCD_FNO-127"; set newname for datafile 130 to "/<DEST_PATH>//data_D-MYPDB_TS-TESTTBSP_FNO-130"; restore clone database skip forever tablespace "PDB01":"USERS", "PDB01":"TEST", "PDB01":"TBSP_XTTS", "PDB01":"PDB01_USERS", "PDB02":"UNDO_SEED", "PDB02":"UNDOTBS1", "PDB02":"SYSTEM", "PDB02":"SYSAUX" ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME ... channel c1: starting datafile backup set restore channel c1: specifying datafile(s) to restore from backup set channel c1: restoring datafile 00130 to /<DEST_PATH>//data_D-MYPDB_TS-TESTTBSP_FNO-130 channel c1: reading from backup piece VB$_4108437090_356504I channel c2: starting datafile backup set restore channel c2: specifying datafile(s) to restore from backup set channel c2: restoring datafile 00001 to /<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-1 channel c2: reading from backup piece VB$_4108437090_356522I channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00122 to /<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-122 channel c3: reading from backup piece VB$_4108437090_356531I channel c1: piece handle=VB$_4108437090_356504I tag=TAG20230201T120419 channel c1: restored backup piece 1 channel c1: restore complete, elapsed time: 00:01:30 channel c1: starting datafile backup set restore channel c1: specifying datafile(s) to restore from backup set channel c1: restoring datafile 00003 to /<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-3 channel c1: reading from backup piece VB$_4108437090_356542I channel c3: piece handle=VB$_4108437090_356531I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:01:29 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00006 to /<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-6 channel c3: reading from backup piece VB$_4108437090_356558I channel c3: piece handle=VB$_4108437090_356558I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:01:27 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00005 to /<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-5 channel c3: reading from backup piece VB$_4108437090_356567I channel c2: piece handle=VB$_4108437090_356522I tag=TAG20230201T120419 channel c2: restored backup piece 1 channel c2: restore complete, elapsed time: 00:04:24 channel c2: starting datafile backup set restore channel c2: specifying datafile(s) to restore from backup set channel c2: restoring datafile 00121 to /<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-121 channel c2: reading from backup piece VB$_4108437090_356576I channel c3: piece handle=VB$_4108437090_356567I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:01:28 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00019 to /<DEST_PATH>//data_D-MYPDB_TS-UNDO_NEW_FNO-19 channel c3: reading from backup piece VB$_4108437090_356589I channel c3: piece handle=VB$_4108437090_356589I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:07 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00125 to /<DEST_PATH>//data_D-MYPDB_TS-USERS_FNO-125 channel c3: reading from backup piece VB$_4108437090_356598I channel c3: piece handle=VB$_4108437090_356598I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:08 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00115 to /<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-115 channel c3: reading from backup piece VB$_4108437090_356607I channel c3: piece handle=VB$_4108437090_356607I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:08 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00116 to /<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-116 channel c3: reading from backup piece VB$_4108437090_356613I channel c3: piece handle=VB$_4108437090_356613I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:07 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00124 to /<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-124 channel c3: reading from backup piece VB$_4108437090_356624I channel c3: piece handle=VB$_4108437090_356624I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:09 channel c3: starting datafile backup set restore channel c3: specifying datafile(s) to restore from backup set channel c3: restoring datafile 00123 to /<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-123 channel c3: reading from backup piece VB$_4108437090_356631I channel c2: piece handle=VB$_4108437090_356576I tag=TAG20230201T120419 channel c2: restored backup piece 1 channel c2: restore complete, elapsed time: 00:01:07 channel c2: starting datafile backup set restore channel c2: specifying datafile(s) to restore from backup set channel c2: restoring datafile 00127 to /<DEST_PATH>//data_D-MYPDB_TS-ABCD_FNO-127 channel c2: reading from backup piece VB$_4108437090_356682I channel c3: piece handle=VB$_4108437090_356631I tag=TAG20230201T120419 channel c3: restored backup piece 1 channel c3: restore complete, elapsed time: 00:00:26 channel c2: piece handle=VB$_4108437090_356682I tag=TAG20230201T120419 channel c2: restored backup piece 1 channel c2: restore complete, elapsed time: 00:00:08 channel c1: piece handle=VB$_4108437090_356542I tag=TAG20230201T120419 channel c1: restored backup piece 1 channel c1: restore complete, elapsed time: 00:04:59 Finished restore at contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy RECID=15 STAMP=1127652916 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-1 datafile 3 switched to datafile copy input datafile copy RECID=16 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-3 datafile 5 switched to datafile copy input datafile copy RECID=17 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-5 datafile 6 switched to datafile copy input datafile copy RECID=18 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-6 datafile 19 switched to datafile copy input datafile copy RECID=19 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_NEW_FNO-19 datafile 115 switched to datafile copy input datafile copy RECID=20 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-115 datafile 116 switched to datafile copy input datafile copy RECID=21 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-116 datafile 121 switched to datafile copy input datafile copy RECID=22 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSTEM_FNO-121 datafile 122 switched to datafile copy input datafile copy RECID=23 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-122 datafile 123 switched to datafile copy input datafile copy RECID=24 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-123 datafile 124 switched to datafile copy input datafile copy RECID=25 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-124 datafile 125 switched to datafile copy input datafile copy RECID=26 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-USERS_FNO-125 datafile 127 switched to datafile copy input datafile copy RECID=27 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-ABCD_FNO-127 datafile 130 switched to datafile copy input datafile copy RECID=28 STAMP=1127652917 file name=/<DEST_PATH>//data_D-MYPDB_TS-TESTTBSP_FNO-130 contents of Memory Script: { set until time "to_date('XXX XX XXXX XX:XX:XX', 'MON DD YYYY HH24:MI:SS')"; recover clone database skip forever tablespace "PDB01":"USERS", "PDB01":"TEST", "PDB01":"TBSP_XTTS", "PDB01":"PDB01_USERS", "PDB02":"UNDO_SEED", "PDB02":"UNDOTBS1", "PDB02":"SYSTEM", "PDB02":"SYSAUX" delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at Executing: alter database datafile 145, 146, 147, 148 offline drop Executing: alter database datafile 126, 129, 131, 149 offline drop starting media recovery archived log for thread 1 with sequence 113 is already on disk as file /refresh/home/app/19.3.0.0/oracle/oradata/orcl19cdb/arch/1_113_1126183346.dbf archived log for thread 1 with sequence 114 is already on disk as file /refresh/home/app/19.3.0.0/oracle/oradata/orcl19cdb/arch/1_114_1126183346.dbf archived log for thread 1 with sequence 115 is already on disk as file /refresh/home/app/19.3.0.0/oracle/oradata/orcl19cdb/arch/1_115_1126183346.dbf archived log for thread 1 with sequence 116 is already on disk as file /refresh/home/app/19.3.0.0/oracle/oradata/orcl19cdb/arch/1_116_1126183346.dbf archived log file name=/<ARCHIVE_LOCATION>/1_47_1122568973.dbf thread=1 sequence=47 archived log file name=/<ARCHIVE_LOCATION>/1_113_1126183346.dbf thread=1 sequence=113 archived log file name=/<ARCHIVE_LOCATION>/1_47_1122568973.dbf thread=1 sequence=47 archived log file name=/<ARCHIVE_LOCATION>/1_114_1126183346.dbf thread=1 sequence=114 archived log file name=/<ARCHIVE_LOCATION>/1_47_1122568973.dbf thread=1 sequence=47 archived log file name=<ARCHIVE_LOCATION>/1_115_1126183346.dbf thread=1 sequence=115 archived log file name=<ARCHIVE_LOCATION>/1_116_1126183346.dbf thread=1 sequence=116 media recovery complete, elapsed time: 00:00:02 Finished recover at released channel: c1 ... Oracle instance started . Total System Global Area 838858864 bytes . Fixed Size 9140336 bytes Variable Size 226492416 bytes Database Buffers 599785472 bytes Redo Buffers 3440640 bytes . contents of Memory Script: { sql clone "alter system set db_name = ''<DEST_DB_NAME>'' 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 = ''<DEST_DB_NAME>'' 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 838858864 bytes Fixed Size 9140336 bytes Variable Size 226492416 bytes Database Buffers 599785472 bytes Redo Buffers 3440640 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "<DEST_DB_NAME>" RESETLOGS ARCHIVELOG MAXLOGFILES 50 MAXLOGMEMBERS 3 MAXDATAFILES 1024 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 21 SIZE 100 M , GROUP 22 SIZE 100 M , GROUP 23 SIZE 100 M DATAFILE '/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-1', '/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-5', '/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-121' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-1"; set newname for tempfile 2 to "/<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-2"; set newname for tempfile 7 to "/<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-7"; switch clone tempfile all; catalog clone datafilecopy "/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-3", "/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6", "/<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19", "/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115", "/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116", "/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122", "/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123", "/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124", "/<DEST_PATH>/data_D-MYPDB_TS-USERS_FNO-125", "/<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127", "/<DEST_PATH>/data_D-MYPDB_TS-TESTTBSP_FNO-130"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME ... renamed tempfile 1 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-1 in control file renamed tempfile 2 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-2 in control file renamed tempfile 7 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-7 in control file renamed tempfile 3 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-3 in control file cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-3 RECID=1 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6 RECID=2 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19 RECID=3 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115 RECID=4 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116 RECID=5 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122 RECID=6 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123 RECID=7 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124 RECID=8 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-USERS_FNO-125 RECID=9 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127 RECID=10 STAMP=1127653003 cataloged datafile copy datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-TESTTBSP_FNO-130 RECID=11 STAMP=1127653003 datafile 3 switched to datafile copy input datafile copy RECID=1 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-3 datafile 6 switched to datafile copy input datafile copy RECID=2 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-6 datafile 19 switched to datafile copy input datafile copy RECID=3 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_NEW_FNO-19 datafile 115 switched to datafile copy input datafile copy RECID=4 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-115 datafile 116 switched to datafile copy input datafile copy RECID=5 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-116 datafile 122 switched to datafile copy input datafile copy RECID=6 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-SYSAUX_FNO-122 datafile 123 switched to datafile copy input datafile copy RECID=7 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDOTBS1_FNO-123 datafile 124 switched to datafile copy input datafile copy RECID=8 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-UNDO_SEED_FNO-124 datafile 125 switched to datafile copy input datafile copy RECID=9 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-USERS_FNO-125 datafile 127 switched to datafile copy input datafile copy RECID=10 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-ABCD_FNO-127 datafile 130 switched to datafile copy input datafile copy RECID=11 STAMP=1127653003 file name=/<DEST_PATH>//data_D-MYPDB_TS-TESTTBSP_FNO-130 Reenabling controlfile options for auxiliary database Executing: alter database force logging contents of Memory Script: { sql clone 'alter system set "_system_trig_enabled"=FALSE'; Alter clone database open resetlogs; sql clone 'alter system reset "_system_trig_enabled"'; } executing Memory Script sql statement: alter system set "_system_trig_enabled"=FALSE database opened PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.14.00.00 in AUXILIARY database is not current PL/SQL package SYS.DBMS_RCVMAN version 19.14.00.00 in AUXILIARY database is not current sql statement: alter system reset "_system_trig_enabled" Executing: drop pluggable database "PDB02" including datafiles 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: drop tablespace "USERS" including contents cascade constraints Executing: drop tablespace "TEST" including contents cascade constraints Executing: drop tablespace "TBSP_XTTS" including contents cascade constraints Executing: drop tablespace "PDB01_USERS" including contents cascade constraints Cannot remove created server parameter file Finished Duplicate Db at RMAN> Now check the PDB details SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 5 PDB01 READ WRITE NO SQL> RMAN> report schema; using target database control file instead of recovery catalog Report of database schema for database with db_unique_name MYPDB List of Permanent Datafiles =========================== File Size(MB) Tablespace RB segs Datafile Name ---- -------- -------------------- ------- ------------------------ 1 1230 SYSTEM YES /<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-1 3 1610 SYSAUX NO /<DEST_PATH>>/data_D-MYPDB_TS-SYSAUX_FNO-3 5 360 PDB$SEED:SYSTEM NO /<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-5 6 450 PDB$SEED:SYSAUX NO /<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6 19 300 UNDO_NEW YES /<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19 115 100 PDB$SEED:UNDO_SEED NO /<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115 116 100 PDB$SEED:UNDOTBS1 NO /<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116 121 380 PDB01:SYSTEM NO /<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-121 122 540 PDB01:SYSAUX NO /<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122 123 100 PDB01:UNDOTBS1 NO /<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123 124 100 PDB01:UNDO_SEED NO /<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124 125 100 USERS NO /<DEST_PATH>//data_D-MYPDB_TS-USERS_FNO-125 127 50 PDB01:ABCD NO /<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127 130 1600 TESTTBSP NO /<DEST_PATH>/data_D-MYPDB_TS-TESTTBSP_FNO-130 List of Temporary Files ======================= File Size(MB) Tablespace Maxsize(MB) Tempfile Name ---- -------- -------------------- ----------- -------------------- 1 300 TEMP 300 /<DEST_PATH>//data_D-MYPDB_TS-TEMP_FNO-1 2 200 TEMP 200 /<DEST_PATH>//data_D-MYPDB_TS-TEMP_FNO-2 3 100 PDB01:TEMP 100 /<DEST_PATH>//data_D-MYPDB_TS-TEMP_FNO-3 7 100 PDB$SEED:TEMP 100 /<DEST_PATH>//data_D-MYPDB_TS-TEMP_FNO-7 RMAN> |