恢复数据库 NBU ZDLRA Backup

Duplicate of specific PDB in LOCAL UNDO for specific tablespaces using Tape/ZDLRA Backup (Doc ID 2926039.1)​编辑To Bottom


In this Document

Goal
Solution
References

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> 

HOW TO PERFORM RMAN PARTIAL DUPLICATE SKIPPING NOT REQUIRED TABLESPACES FROM TAPE/ZDLRA BACKUP (Doc ID 2914588.1)​编辑To Bottom


In this Document

Goal
Solution
References

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 skipping not required tablespace to new database using Tape/ZDLRA backups.This doc is useful incase of skipping only those tablespace name which are not needed while Duplicate.
In this doc one can include only those tablespaces which are not needed for business data.By default, RMAN duplicates the root and the seed database of the CDB that contains the listed PDBs.
In this doc, after duplicate new CDB is created with required tabelspace (and root and the seed database of the CDB).
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.
DEST_DB_NAME                : Destination database name.
DEST_PATH                   : Path of CDB and PDb datafiles in Destination database.
PDB01                       : Pluggable database name which needs to be duplicate from source CDB.ss
SKIPPED_TABLESPACE          : Tablespace name or list which needs to be skipped from required Pluggable database .
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 DB 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

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.

PDB01_USERS tablespace we are Skipping in below example.

When Duplicate finished, it will only restore root,PDB$SEED,PDB01 and it will skip PDB01:PDB01_USERS tablespace.
New Db will include root,PDB$SEED,PDB01 excluding PDB01_USERS tablespace.

-- Below is Source Database REPORT SCHEMA

RMAN> report schema;

Report of database schema for database with db_unique_name <SOURCE_DB_UNIQUE_NAME>

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 1080 SYSTEM YES /<SOURCE_DB_DATAFILE_LOCATION>/data_D-ORCL19CD_TS-SYSTEM_FNO-1
3 1470 SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/data_D-ORCL19CD_TS-SYSAUX_FNO-3
5 360 PDB$SEED:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/pdbseed/data_D-ORCL19CD_TS-SYSTEM_FNO-5
6 450 PDB$SEED:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/pdbseed/data_D-ORCL19CD_TS-SYSAUX_FNO-6
19 300 UNDO_NEW YES /<SOURCE_DB_DATAFILE_LOCATION>/data_D-ORCL19CD_TS-UNDO_NEW_FNO-19
115 100 PDB$SEED:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undo_see_krtq53jm_.dbf
116 100 PDB$SEED:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undotbs1_krtq6r09_.dbf
117 360 PDB02:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_system_krtqh73b_.dbf
118 450 PDB02:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_sysaux_krtqh73d_.dbf
119 100 PDB02:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undotbs1_krtqh73f_.dbf
120 100 PDB02:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undo_see_krtqh73f_.dbf
121 360 PDB01:SYSTEM NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_system_krtqkjh9_.dbf
122 460 PDB01:SYSAUX NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_sysaux_krtqkjhd_.dbf
123 100 PDB01:UNDOTBS1 NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undotbs1_krtqkjhf_.dbf
124 100 PDB01:UNDO_SEED NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_undo_see_krtqkjhh_.dbf
125 100 USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_users_krtqplgg_.dbf
126 100 PDB01:PDB01_USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_pdb01_us_krtqs8vb_.dbf
127 50 PDB01:ABCD NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_abcd_krtqt7q2_.dbf
128 50 PDB02:PDBO2_USERS NO /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_pdbo2_us_krtr0rgg_.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 300 TEMP 300 /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/datafile/o1_mf_temp_krsmjlmb_.tmp
2 200 TEMP 200 /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/datafile/o1_mf_temp_krsmjlkw_.tmp
3 100 PDB01:TEMP 100 /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_temp_krtqmqkz_.tmp
4 100 PDB02:TEMP 100 /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_temp_krtqn4xb_.tmp
7 100 PDB$SEED:TEMP 100 /<SOURCE_DB_DATAFILE_LOCATION>/<SOURCE_DB_UNIQUE_NAME>/../o1_mf_temp_krtqnhgm_.tmp

In destination database need to connect with auxiliary (without target connection) and catalog .

Here we used ZDLRA catalog.

In below syntax we need to mention pluggable database name which needs after duplicate and skip Tablespace Name which are not needed while Duplicate.

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/XXX$'@DEST_TNS catalog /@<ZDLRA_CONNECT_STRING> <==In case of NON ZDLRA, one can mention catalog user credentials.
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';
DUPLICATE DATABASE <SOURCE_DB_NAME> TO <DEST_DB_NAME> pluggable database pdb01,root
SKIP TABLESPACE <PDB_NAME>:<SKIPPED_TABLESPACE>;
}

 
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> 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 ORCL19CD TO mypdb pluggable database pdb01,root
SKIP TABLESPACE PDB01:PDB01_USERS;
}
...
allocated channel: c1
channel c1: SID=428 device type=SBT_TAPE
channel c1: RA Library (ZDLRA) SID=EF42066792092A97E0533432410A371F
allocated channel: c2
channel c2: SID=426 device type=SBT_TAPE
channel c2: RA Library (ZDLRA) SID=EF4214B9591D2B69E0533432410AA6ED
allocated channel: c3
channel c3: SID=429 device type=SBT_TAPE
channel c3: RA Library (ZDLRA) SID=EF4214F9B8752B6FE0533432410A77D6
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
Fixed Size
Variable Size
Database Buffers
Redo Buffers
allocated channel: c1
channel c1: SID=424 device type=SBT_TAPE
channel c1: RA Library (ZDLRA) SID=EF421830B0072C0DE0533432410A6CF4
allocated channel: c2
channel c2: SID=428 device type=SBT_TAPE
channel c2: RA Library (ZDLRA) SID=EF421873691A2C13E0533432410AAC8F
allocated channel: c3
channel c3: SID=429 device type=SBT_TAPE
channel c3: RA Library (ZDLRA) SID=EF4218B7A70E2C19E0533432410AD17D
duplicating Online logs to Oracle Managed File (OMF) location
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
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
allocated channel: c1
channel c1: SID=424 device type=SBT_TAPE
channel c1: RA Library (ZDLRA) SID=EF421B8206142CB3E0533432410A8C0D
allocated channel: c2
channel c2: SID=428 device type=SBT_TAPE
channel c2: RA Library (ZDLRA) SID=EF421BC7044A2CBDE0533432410ABB59
allocated channel: c3
channel c3: SID=429 device type=SBT_TAPE
channel c3: RA Library (ZDLRA) SID=EF421C0DA7F22CC9E0533432410A549D
Starting restore at 07-DEC-22
channel c1: starting datafile backup set restore
channel c1: restoring control file
channel c1: reading from backup piece c-3687178233-20221207-01
channel c1: piece handle=c-3687178233-20221207-01 tag=TAG20221207T180829
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:00:04
output file name=/refresh/home/app/19.3.0.0/oracle/oradata/mypdb/control01.ctl
output file name=/refresh/home/app/19.3.0.0/oracle/oradata/mypdb/control02.ctl
Finished restore at 07-DEC-22
database mounted
Skipping pluggable database PDB02
Not connected to TARGET or TARGET not open, cannot verify that subset of tablespaces is self-contained
Automatically adding tablespace PDB$SEED:SYSTEM
Automatically adding tablespace PDB$SEED:SYSAUX
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;
sql clone 'alter database flashback off';
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";
restore
clone database
skip forever tablespace "PDB02":"UNDO_SEED",
"PDB02":"UNDOTBS1",
"PDB02":"SYSTEM",
"PDB02":"SYSAUX",
"PDB01":"PDB01_USERS",
"PDB02":"PDBO2_USERS" ;
}
executing Memory Script
executing command: SET until clause
sql statement: alter database flashback off
executing command: SET NEWNAME
executing command: SET NEWNAME
..
Starting restore at
..
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to /<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-1
channel c1: reading from backup piece VB$_4108437090_331812_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00006 to /<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6
channel c2: reading from backup piece VB$_4108437090_331825_6
..
channel c3: restore complete, elapsed time: 00:04:13
Finished restore at
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=14 STAMP=1122835011 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-1
datafile 3 switched to datafile copy
input datafile copy RECID=15 STAMP=1122835011 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-3
datafile 5 switched to datafile copy
input datafile copy RECID=16 STAMP=1122835011 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-5
datafile 6 switched to datafile copy
input datafile copy RECID=17 STAMP=1122835011 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6
datafile 19 switched to datafile copy
input datafile copy RECID=18 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19
datafile 115 switched to datafile copy
input datafile copy RECID=19 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115
datafile 116 switched to datafile copy
input datafile copy RECID=20 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116
datafile 121 switched to datafile copy
input datafile copy RECID=21 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSTEM_FNO-121
datafile 122 switched to datafile copy
input datafile copy RECID=22 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122
datafile 123 switched to datafile copy
input datafile copy RECID=23 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123
datafile 124 switched to datafile copy
input datafile copy RECID=24 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124
datafile 125 switched to datafile copy
input datafile copy RECID=25 STAMP=1122835012 file name=/<DEST_PATH>/data_D-MYPDB_TS-USERS_FNO-125
datafile 127 switched to datafile copy
input datafile copy RECID=26 STAMP=1122835013 file name=/<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127
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 "PDB02":"UNDO_SEED",
"PDB02":"UNDOTBS1",
"PDB02":"SYSTEM",
"PDB02":"SYSAUX",
"PDB01":"PDB01_USERS",
"PDB02":"PDBO2_USERS" delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 
Executing: alter database datafile 120 offline drop
Executing: alter database datafile 119 offline drop
Executing: alter database datafile 117 offline drop
Executing: alter database datafile 118 offline drop
Executing: alter database datafile 126 offline drop
Executing: alter database datafile 128 offline drop
starting media recovery
archived log for thread 1 with sequence 47 is already on disk as file <ARCHIVE_LOCATION>/1_47_1122568973.dbf
archived log for thread 1 with sequence 48 is already on disk as file <ARCHIVE_LOCATION>/1_48_1122568973.dbf
archived log file name=<ARCHIVE_LOCATION>/1_47_1122568973.dbf thread=1 sequence=47
archived log file name=<ARCHIVE_LOCATION>/1_48_1122568973.dbf thread=1 sequence=48
media recovery complete, elapsed time:
Finished recover at 07-DEC-22
released channel: c1
released channel: c2
released channel: c3
Oracle instance started
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
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 838858856 bytes
Fixed Size 9140328 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 3 to
"/<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-3";
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";
switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
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 3 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-3 in control file
renamed tempfile 7 to /<DEST_PATH>/data_D-MYPDB_TS-TEMP_FNO-7 in control file
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-3 RECID=1 STAMP=1122835107
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6 RECID=2 STAMP=1122835107
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19 RECID=3 STAMP=1122835107
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115 RECID=4 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116 RECID=5 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122 RECID=6 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123 RECID=7 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124 RECID=8 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-USERS_FNO-125 RECID=9 STAMP=1122835108
cataloged datafile copy
datafile copy file name=/<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127 RECID=10 STAMP=1122835108
datafile 3 switched to datafile copy
input datafile copy RECID=1 STAMP=1122835107 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-3
datafile 6 switched to datafile copy
input datafile copy RECID=2 STAMP=1122835107 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-6
datafile 19 switched to datafile copy
input datafile copy RECID=3 STAMP=1122835107 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_NEW_FNO-19
datafile 115 switched to datafile copy
input datafile copy RECID=4 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-115
datafile 116 switched to datafile copy
input datafile copy RECID=5 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-116
datafile 122 switched to datafile copy
input datafile copy RECID=6 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-SYSAUX_FNO-122
datafile 123 switched to datafile copy
input datafile copy RECID=7 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDOTBS1_FNO-123
datafile 124 switched to datafile copy
input datafile copy RECID=8 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-UNDO_SEED_FNO-124
datafile 125 switched to datafile copy
input datafile copy RECID=9 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-USERS_FNO-125
datafile 127 switched to datafile copy
input datafile copy RECID=10 STAMP=1122835108 file name=/<DEST_PATH>/data_D-MYPDB_TS-ABCD_FNO-127
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
sql statement: alter system reset "_system_trig_enabled"
Executing: alter database flashback on
Executing: drop pluggable database "PDB02" including datafiles
contents of Memory Script:
{
sql clone "alter pluggable database all open";
}
executing Memory Script
...
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 YES

Now check the required data and can take export backup of required tables if needed

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/137825.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

如何解决 503 Service Temporarily Unavailable?

&#x1f337;&#x1f341; 博主猫头虎&#xff08;&#x1f405;&#x1f43e;&#xff09;带您 Go to New World✨&#x1f341; &#x1f405;&#x1f43e;猫头虎建议程序员必备技术栈一览表&#x1f4d6;&#xff1a; &#x1f6e0;️ 全栈技术 Full Stack: &#x1f4da…

轻松使用androidstudio交叉编译libredwg库

对于安卓或嵌入式开发者而言,交叉编译是再熟悉不过的操作了,可是对于一些刚入门或初级开发者经常会遇到这样的问题:如何交叉编译C++库来生成安卓下的so库呢? 最近有一些粉丝找到我求救,那么我最近刚好有空大致研究了下,帮他们成功编译了其中一个libredwg的C++库,这篇文章…

21天学会C++:Day13----动态内存管理

CSDN的uu们&#xff0c;大家好。这里是C入门的第十三讲。 座右铭&#xff1a;前路坎坷&#xff0c;披荆斩棘&#xff0c;扶摇直上。 博客主页&#xff1a; 姬如祎 收录专栏&#xff1a;C专题 目录 1. 加深对内存四区的理解 2. new-delete 与 malloc-free 2.1 能否用 fre…

滚雪球学Java(31):玩转多维数组:高效访问和遍历

&#x1f3c6;本文收录于「滚雪球学Java」专栏&#xff0c;专业攻坚指数级提升&#xff0c;助你一臂之力&#xff0c;带你早日登顶&#x1f680;&#xff0c;欢迎大家关注&&收藏&#xff01;持续更新中&#xff0c;up&#xff01;up&#xff01;up&#xff01;&#xf…

离散数学 学习 之一阶逻辑的前束范式

敲重点 如果是蕴含式的前件要改变符号&#xff0c;后件不需要

uniapp选择地址弹窗组件

1.效果 2.子组件在components里面创建组件AddreessWindow <template><view style"position: relative;z-index: 999999 !important;"><view class"address-window" :class"value true ? on : "><view class"title…

【LeetCode每日一题合集】2023.9.11-2023.9.17(⭐反悔贪心拓扑排序Floyd)

文章目录 630. 课程表 III解法——反悔贪心⭐⭐⭐⭐⭐ 1462. 课程表 IV⭐解法1——拓扑排序预处理解法2——Floyd算法判断是否存在路径 2596. 检查骑士巡视方案&#xff08;方向模拟&#xff09;1222. 可以攻击国王的皇后&#xff08;方向模拟&#xff09;LCP 50. 宝石补给&…

Leetcode 106. 从中序与后序遍历序列构造二叉树

文章目录 题目代码&#xff08;9.18 首刷自解&#xff09; 题目 Leetcode 106. 从中序与后序遍历序列构造二叉树 代码&#xff08;9.18 首刷自解&#xff09; class Solution { public:unordered_map<int, int> val2Index;TreeNode* buildTree(vector<int>& …

C++运算符优先级一览表

VC常用功能开发汇总&#xff08;专栏文章列表&#xff0c;欢迎订阅&#xff0c;持续更新...&#xff09;https://blog.csdn.net/chenlycly/article/details/124272585C软件异常排查从入门到精通系列教程&#xff08;专栏文章列表&#xff0c;欢迎订阅&#xff0c;持续更新...&a…

开发需知的文件加密与解密

背景 最近团队遇到一个小需求&#xff0c;存在两个系统 A、B&#xff0c;系统 A 支持用户在线制作皮肤包&#xff0c;制作后的皮肤包用户可以下载后&#xff0c;导入到另外的系统 B 上。皮肤包本身的其实就是一个 zip 压缩包&#xff0c;系统 B 接收到压缩包后&#xff0c;解压…

dvwa靶场通关(十二)

第十二关&#xff1a;Stored Cross Site Scripting (XSS)&#xff08;存储型xss&#xff09; low 这一关没有任何防护&#xff0c;直接输入弹窗代码 弹窗成功 medium 先试试上面的代码看看&#xff0c;有没有什么防护 发现我们的script标签不见了&#xff0c;应该是被过滤掉…

跑腿系统开发:构建实时任务分配算法的技术挑战

在跑腿系统中&#xff0c;实时任务分配算法是确保任务快速高效完成的关键因素之一。本文将介绍构建实时任务分配算法时可能面临的技术挑战&#xff0c;并提供一个简单的Python示例来解决这些挑战。 技术挑战&#xff1a; 实时数据处理&#xff1a; 跑腿系统需要处理大量的实时任…

Windows Server 2008安装.NET Framework 3.5

安装.NET Framework 3.5一、打开服务器管理器 在开始菜单中搜索“服务器管理器” 二、添加.NET Framework 3.5.1功能 &#xff08;一&#xff09;功能-》添加功能 &#xff08;二&#xff09;选择功能“.NET Framework 3.51” 1.点击“NET Framework 3.5.1”勾选框 2.点击“添…

C#小知识

项目编译后复制文件到生成目录 方法1 对于单个文件&#xff0c;可以点击属性。输出目录里选择始终复制。 方法2 把项目中的ServerScripts复制到输出目录。 在项目设置中&#xff0c;生成事件里添加批处理 xcopy $(ProjectDir)ServerScripts\*.* $(TargetDir)ServerScrip…

本地搭建CFimagehost私人图床——“cpolar内网穿透”

文章目录 1.前言2. CFImagehost网站搭建2.1 CFImagehost下载和安装2.2 CFImagehost网页测试2.3 cpolar的安装和注册 3.本地网页发布3.1 Cpolar临时数据隧道3.2 Cpolar稳定隧道&#xff08;云端设置&#xff09;3.3.Cpolar稳定隧道&#xff08;本地设置&#xff09; 4.公网访问测…

【JVM】Java类的加载机制!

一、类的生命周期 类加载过程包含&#xff1a;加载、验证、准备、解析和初始化 &#xff0c;一共包括5 个阶段。 &#xff08;1&#xff09;加载&#xff1a; 简单来说就是将java类的字节码文件加载到机器内存中。在加载类时&#xff0c;Java虚拟机必须完成以下3件事情&…

[Linux打怪升级之路]-缓冲区

前言 作者&#xff1a;小蜗牛向前冲 名言&#xff1a;我可以接受失败&#xff0c;但我不能接受放弃 如果觉的博主的文章还不错的话&#xff0c;还请点赞&#xff0c;收藏&#xff0c;关注&#x1f440;支持博主。如果发现有问题的地方欢迎❀大家在评论区指正 本期学习目标&…

AI助力安全监管:TSINGSEE视频智能分析系统烟火识别算法

水火无情人有情&#xff0c;火灾一旦发生没有被及时发现&#xff0c;就能在极短的时间内酿成无法挽回的大祸&#xff0c;所以烟火的监管与处理极为重要。为了让火患在刚发生时就能得到扼制&#xff0c;TSINGSEE青犀AI智能分析网关烟火识别算法具有重要意义。 TSINGSEE青犀AI智能…

Arcgis栅格转点时ERROR 999999: 执行函数时出错。 无法创建要素数据集。 执行(RasterToPoint)失败

Arcgis栅格转点时ERROR 999999: 执行函数时出错。 无法创建要素数据集。 执行(RasterToPoint)失败。 问题描述 原因 输出点要素的位置不对 解决方案 点击新建文件地理数据库 然后在该文件地理数据库下输出

.Net IDE智能提示汉化(.Net6、AspNetCore)

先上现成的.net6汉化文件&#xff0c;可以手动下载后参照 如何为 .NET 安装本地化的 IntelliSense 文件 进行安装。或者使用后文的工具进行自动安装。 无对照英文在前中文在前 汉化内容来自 官方在线文档 &#xff0c;某些内容可能存在明显的机翻痕迹。 上一些效果图&#x…