lsnrctl status //查看Service name
sqlplus sys/oracle@cdb1 as sysdba //登录cdb
col name format a16
col pdb format a16
select name,pdb from v$services;
alter session set container=pdb_easyee;
SQL> alter database enable block change tracking using file '/u01/app/oracle/oradata/CDB1/block_change_track_file.f';
Database altered.
$oracle@ORACLE-212$export ORACLE_SID=cdb1
$oracle@ORACLE-212$echo $ORACLE_SID
cdb1
$rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Wed Aug 5 03:50:00 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: CDB1 (DBID=1010358776)
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name CDB1
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 900 SYSTEM YES /u01/app/oracle/oradata/CDB1/system01.dbf
3 580 SYSAUX NO /u01/app/oracle/oradata/CDB1/sysaux01.dbf
4 65 UNDOTBS1 YES /u01/app/oracle/oradata/CDB1/undotbs01.dbf
5 260 PDB$SEED:SYSTEM NO /u01/app/oracle/oradata/CDB1/pdbseed/system01.dbf
6 280 PDB$SEED:SYSAUX NO /u01/app/oracle/oradata/CDB1/pdbseed/sysaux01.dbf
7 5 USERS NO /u01/app/oracle/oradata/CDB1/users01.dbf
8 100 PDB$SEED:UNDOTBS1 NO /u01/app/oracle/oradata/CDB1/pdbseed/undotbs01.dbf
9 540 PDB_EASYEE:SYSTEM YES /u01/app/oracle/oradata/CDB1/pdb_easyee/system01.dbf
10 320 PDB_EASYEE:SYSAUX NO /u01/app/oracle/oradata/CDB1/pdb_easyee/sysaux01.dbf
11 680 PDB_EASYEE:UNDOTBS1 YES /u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01.dbf
12 5 PDB_EASYEE:USERS NO /u01/app/oracle/oradata/CDB1/pdb_easyee/users01.dbf
13 1024 PDB_EASYEE:PDBEASYEE_DATA NO /u01/app/oracle/oradata/CDB1/pdb_easyee/pdbeasyee_data01.dbf
14 1024 PDB_EASYEE:BTTEST NO /u01/app/oracle/oradata/CDB1/pdb_easyee/bttest.dbf
15 10 PDB_EASYEE:UNDOTBS1 YES /u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01_2.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 32 TEMP 32767 /u01/app/oracle/oradata/CDB1/temp01.dbf
2 36 PDB$SEED:TEMP 32767 /u01/app/oracle/oradata/CDB1/pdbseed/temp012020-04-02_03-56-28-909-AM.dbf
3 36 PDB_EASYEE:TEMP 32767 /u01/app/oracle/oradata/CDB1/pdb_easyee/temp01.dbf
4 32 PDB_EASYEE:PDBEASYEE_TEMP 32767 /u01/app/oracle/oradata/CDB1/pdb_easyee/pdbeasyee_temp01.dbf
run {
ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
BACKUP AS COPY TAG 'BASE01' INCREMENTAL LEVEL 0 DATABASE;
}
RMAN> run {
2> ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
3> BACKUP AS COPY TAG 'BASE01' INCREMENTAL LEVEL 0 DATABASE;
4> }
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: SID=304 device type=DISK
Starting backup at 2020-08-05 03:50:56
channel ch1: starting datafile copy
input datafile file number=00013 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/pdbeasyee_data01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-PDBEASYEE_DATA_FNO-13_02v72kd0 tag=BASE01 RECID=4 STAMP=1047613881
channel ch1: datafile copy complete, elapsed time: 00:00:25
channel ch1: starting datafile copy
input datafile file number=00014 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/bttest.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-BTTEST_FNO-14_03v72kdp tag=BASE01 RECID=5 STAMP=1047613908
channel ch1: datafile copy complete, elapsed time: 00:00:35
channel ch1: starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/CDB1/system01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-1_04v72kes tag=BASE01 RECID=6 STAMP=1047613954
channel ch1: datafile copy complete, elapsed time: 00:00:45
channel ch1: starting datafile copy
input datafile file number=00011 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-11_05v72kg9 tag=BASE01 RECID=7 STAMP=1047613993
channel ch1: datafile copy complete, elapsed time: 00:00:35
channel ch1: starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/CDB1/sysaux01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-3_06v72khd tag=BASE01 RECID=8 STAMP=1047614019
channel ch1: datafile copy complete, elapsed time: 00:00:25
channel ch1: starting datafile copy
input datafile file number=00009 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/system01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-9_07v72ki6 tag=BASE01 RECID=9 STAMP=1047614044
channel ch1: datafile copy complete, elapsed time: 00:00:25
channel ch1: starting datafile copy
input datafile file number=00010 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/sysaux01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-10_08v72kiv tag=BASE01 RECID=10 STAMP=1047614054
channel ch1: datafile copy complete, elapsed time: 00:00:15
channel ch1: starting datafile copy
input datafile file number=00006 name=/u01/app/oracle/oradata/CDB1/pdbseed/sysaux01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-6_09v72kje tag=BASE01 RECID=11 STAMP=1047614068
channel ch1: datafile copy complete, elapsed time: 00:00:07
channel ch1: starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/CDB1/pdbseed/system01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-5_0av72kjl tag=BASE01 RECID=12 STAMP=1047614075
channel ch1: datafile copy complete, elapsed time: 00:00:07
channel ch1: starting datafile copy
input datafile file number=00008 name=/u01/app/oracle/oradata/CDB1/pdbseed/undotbs01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-8_0bv72kjs tag=BASE01 RECID=13 STAMP=1047614078
channel ch1: datafile copy complete, elapsed time: 00:00:03
channel ch1: starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/CDB1/undotbs01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-4_0cv72kjv tag=BASE01 RECID=14 STAMP=1047614081
channel ch1: datafile copy complete, elapsed time: 00:00:03
channel ch1: starting datafile copy
input datafile file number=00015 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01_2.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-15_0dv72kk2 tag=BASE01 RECID=15 STAMP=1047614082
channel ch1: datafile copy complete, elapsed time: 00:00:01
channel ch1: starting datafile copy
input datafile file number=00007 name=/u01/app/oracle/oradata/CDB1/users01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-USERS_FNO-7_0ev72kk3 tag=BASE01 RECID=16 STAMP=1047614083
channel ch1: datafile copy complete, elapsed time: 00:00:01
channel ch1: starting datafile copy
input datafile file number=00012 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/users01.dbf
output file name=/u01/bk/data_D-CDB1_I-1010358776_TS-USERS_FNO-12_0fv72kk4 tag=BASE01 RECID=17 STAMP=1047614084
channel ch1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2020-08-05 03:54:45
Starting Control File and SPFILE Autobackup at 2020-08-05 03:54:45
piece handle=/u01/app/oracle/flashback/CDB1/autobackup/2020_08_05/o1_mf_s_1047614085_hlnsg6g5_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2020-08-05 03:54:46
released channel: ch1
oracle@ORACLE-212$ls -lh /u01/bk
total 5.7G
-rw-r----- 1 oracle oinstall 1.1G Aug 5 03:51 data_D-CDB1_I-1010358776_TS-BTTEST_FNO-14_03v72kdp
-rw-r----- 1 oracle oinstall 1.1G Aug 5 03:51 data_D-CDB1_I-1010358776_TS-PDBEASYEE_DATA_FNO-13_02v72kd0
-rw-r----- 1 oracle oinstall 321M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-10_08v72kiv
-rw-r----- 1 oracle oinstall 581M Aug 5 03:53 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-3_06v72khd
-rw-r----- 1 oracle oinstall 281M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-6_09v72kje
-rw-r----- 1 oracle oinstall 901M Aug 5 03:52 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-1_04v72kes
-rw-r----- 1 oracle oinstall 261M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-5_0av72kjl
-rw-r----- 1 oracle oinstall 541M Aug 5 03:53 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-9_07v72ki6
-rw-r----- 1 oracle oinstall 681M Aug 5 03:52 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-11_05v72kg9
-rw-r----- 1 oracle oinstall 11M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-15_0dv72kk2
-rw-r----- 1 oracle oinstall 66M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-4_0cv72kjv
-rw-r----- 1 oracle oinstall 101M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-8_0bv72kjs
-rw-r----- 1 oracle oinstall 5.1M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-USERS_FNO-12_0fv72kk4
-rw-r----- 1 oracle oinstall 5.1M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-USERS_FNO-7_0ev72kk3
创建测试数据
SQL> create table rmantest1 as select * from rmantest;
SQL> select count(*) from rmantest1;
run {
ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
BACKUP TAG 'incr_update' INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;
}
RMAN> run {
2> ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
3> BACKUP TAG 'incr_update' INCREMENTAL LEVEL 1 DATABASE;
4> }
allocated channel: ch1
channel ch1: SID=304 device type=DISK
Starting backup at 2020-08-05 04:00:21
channel ch1: starting incremental level 1 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00013 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/pdbeasyee_data01.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/bttest.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/system01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/sysaux01.dbf
input datafile file number=00015 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/undotbs01_2.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/CDB1/pdb_easyee/users01.dbf
channel ch1: starting piece 1 at 2020-08-05 04:00:21
channel ch1: finished piece 1 at 2020-08-05 04:00:22
piece handle=/u01/bk/0hv72kul_1_1 tag=INCR_UPDATE comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:01
channel ch1: starting incremental level 1 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/CDB1/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/CDB1/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/CDB1/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/CDB1/users01.dbf
channel ch1: starting piece 1 at 2020-08-05 04:00:23
channel ch1: finished piece 1 at 2020-08-05 04:00:26
piece handle=/u01/bk/0iv72kum_1_1 tag=INCR_UPDATE comment=NONE
channel ch1: backup set complete, elapsed time: 00:00:03
channel ch1: starting incremental level 1 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00006 name=/u01/app/oracle/oradata/CDB1/pdbseed/sysaux01.dbf
skipping datafile 00006 because it has not changed
input datafile file number=00005 name=/u01/app/oracle/oradata/CDB1/pdbseed/system01.dbf
skipping datafile 00005 because it has not changed
input datafile file number=00008 name=/u01/app/oracle/oradata/CDB1/pdbseed/undotbs01.dbf
skipping datafile 00008 because it has not changed
channel ch1: backup cancelled because all files were skipped
Finished backup at 2020-08-05 04:00:26
Starting Control File and SPFILE Autobackup at 2020-08-05 04:00:26
piece handle=/u01/app/oracle/flashback/CDB1/autobackup/2020_08_05/o1_mf_s_1047614426_hlnsrtdc_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2020-08-05 04:00:27
released channel: ch1
$ls -lh /u01/bk
total 5.7G
-rw-r----- 1 oracle oinstall 248K Aug 5 04:00 0hv72kul_1_1
-rw-r----- 1 oracle oinstall 9.5M Aug 5 04:00 0iv72kum_1_1
-rw-r----- 1 oracle oinstall 1.1G Aug 5 03:51 data_D-CDB1_I-1010358776_TS-BTTEST_FNO-14_03v72kdp
-rw-r----- 1 oracle oinstall 1.1G Aug 5 03:51 data_D-CDB1_I-1010358776_TS-PDBEASYEE_DATA_FNO-13_02v72kd0
-rw-r----- 1 oracle oinstall 321M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-10_08v72kiv
-rw-r----- 1 oracle oinstall 581M Aug 5 03:53 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-3_06v72khd
-rw-r----- 1 oracle oinstall 281M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-6_09v72kje
-rw-r----- 1 oracle oinstall 901M Aug 5 03:52 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-1_04v72kes
-rw-r----- 1 oracle oinstall 261M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-5_0av72kjl
-rw-r----- 1 oracle oinstall 541M Aug 5 03:53 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-9_07v72ki6
-rw-r----- 1 oracle oinstall 681M Aug 5 03:52 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-11_05v72kg9
-rw-r----- 1 oracle oinstall 11M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-15_0dv72kk2
-rw-r----- 1 oracle oinstall 66M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-4_0cv72kjv
-rw-r----- 1 oracle oinstall 101M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-8_0bv72kjs
-rw-r----- 1 oracle oinstall 5.1M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-USERS_FNO-12_0fv72kk4
-rw-r----- 1 oracle oinstall 5.1M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-USERS_FNO-7_0ev72kk3
run {
ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
RECOVER COPY OF DATABASE WITH TAG 'BASE01';
}
RMAN> run {
2> ALLOCATE CHANNEL "ch1" DEVICE TYPE DISK FORMAT "/u01/bk/%U";
3> RECOVER COPY OF DATABASE WITH TAG 'BASE01';
4> }
allocated channel: ch1
channel ch1: SID=304 device type=DISK
Starting recover at 2020-08-05 04:21:52
no copy of datafile 5 found to recover
no copy of datafile 6 found to recover
no copy of datafile 8 found to recover
channel ch1: starting incremental datafile backup set restore
channel ch1: specifying datafile copies to recover
recovering datafile copy file number=00009 name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-9_07v72ki6
recovering datafile copy file number=00010 name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-10_08v72kiv
recovering datafile copy file number=00011 name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-11_05v72kg9
recovering datafile copy file number=00012 name=/u01/bk/data_D-CDB1_I-1010358776_TS-USERS_FNO-12_0fv72kk4
recovering datafile copy file number=00013 name=/u01/bk/data_D-CDB1_I-1010358776_TS-PDBEASYEE_DATA_FNO-13_02v72kd0
recovering datafile copy file number=00014 name=/u01/bk/data_D-CDB1_I-1010358776_TS-BTTEST_FNO-14_03v72kdp
recovering datafile copy file number=00015 name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-15_0dv72kk2
channel ch1: reading from backup piece /u01/bk/0hv72kul_1_1
channel ch1: piece handle=/u01/bk/0hv72kul_1_1 tag=INCR_UPDATE
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:01
channel ch1: starting incremental datafile backup set restore
channel ch1: specifying datafile copies to recover
recovering datafile copy file number=00001 name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-1_04v72kes
recovering datafile copy file number=00003 name=/u01/bk/data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-3_06v72khd
recovering datafile copy file number=00004 name=/u01/bk/data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-4_0cv72kjv
recovering datafile copy file number=00007 name=/u01/bk/data_D-CDB1_I-1010358776_TS-USERS_FNO-7_0ev72kk3
channel ch1: reading from backup piece /u01/bk/0iv72kum_1_1
channel ch1: piece handle=/u01/bk/0iv72kum_1_1 tag=INCR_UPDATE
channel ch1: restored backup piece 1
channel ch1: restore complete, elapsed time: 00:00:03
Finished recover at 2020-08-05 04:21:57
Starting Control File and SPFILE Autobackup at 2020-08-05 04:21:57
piece handle=/u01/app/oracle/flashback/CDB1/autobackup/2020_08_05/o1_mf_s_1047615717_hlnv15jx_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 2020-08-05 04:21:58
released channel: ch1
oracle@ORACLE-212$ls -lh /u01/bk
total 5.7G
-rw-r----- 1 oracle oinstall 248K Aug 5 04:00 0hv72kul_1_1
-rw-r----- 1 oracle oinstall 9.5M Aug 5 04:00 0iv72kum_1_1
-rw-r----- 1 oracle oinstall 1.1G Aug 5 04:21 data_D-CDB1_I-1010358776_TS-BTTEST_FNO-14_03v72kdp
-rw-r----- 1 oracle oinstall 1.1G Aug 5 04:21 data_D-CDB1_I-1010358776_TS-PDBEASYEE_DATA_FNO-13_02v72kd0
-rw-r----- 1 oracle oinstall 321M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-10_08v72kiv
-rw-r----- 1 oracle oinstall 581M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-3_06v72khd
-rw-r----- 1 oracle oinstall 281M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSAUX_FNO-6_09v72kje
-rw-r----- 1 oracle oinstall 901M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-1_04v72kes
-rw-r----- 1 oracle oinstall 261M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-5_0av72kjl
-rw-r----- 1 oracle oinstall 541M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-SYSTEM_FNO-9_07v72ki6
-rw-r----- 1 oracle oinstall 681M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-11_05v72kg9
-rw-r----- 1 oracle oinstall 11M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-15_0dv72kk2
-rw-r----- 1 oracle oinstall 66M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-4_0cv72kjv
-rw-r----- 1 oracle oinstall 101M Aug 5 03:54 data_D-CDB1_I-1010358776_TS-UNDOTBS1_FNO-8_0bv72kjs
-rw-r----- 1 oracle oinstall 5.1M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-USERS_FNO-12_0fv72kk4
-rw-r----- 1 oracle oinstall 5.1M Aug 5 04:21 data_D-CDB1_I-1010358776_TS-USERS_FNO-7_0ev72kk3
$ls -lh /u01/app/oracle/flashback/CDB1/autobackup/
total 0
drwxr-x--- 2 oracle oinstall 46 Jun 23 01:47 2020_06_23
drwxr-x--- 2 oracle oinstall 126 Aug 5 04:21 2020_08_05
SQL> alter database backup controlfile to trace;
2020-08-05T04:34:55.312846-04:00
alter database backup controlfile to trace
2020-08-05T04:34:55.314064-04:00
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/cdb1/cdb1/trace/cdb1_ora_3319.trc
Completed: alter database backup controlfile to trace
SQL> create table scott.test22 (id number);
SQL> alter system switch logfile;
SQL> shutdown immediate;
[oracle@sqlaudit ~]$ cd $ORACLE_HOME/dbs
[oracle@sqlaudit dbs]$ cp orapwsrcdb orapwsrcdbnew
[oracle@sqlaudit dbs]$ strings spfilesrcdb.ora > initsrcdbnew.ora
[oracle@sqlaudit dbs]$ cat initsrcdbnew.ora | grep '/oracle/'
*.audit_file_dest='/oracle/app/oracle/admin/srcdbnew/adump'
*.control_files='/oradata/srcdb_img/control01.ctl','/oradata/srcdb_img/control02.ctl'
[oracle@sqlaudit dbs]$ mkdir -p /oracle/app/oracle/admin/srcdbnew/adump
[oracle@sqlaudit dbs]$ export ORACLE_SID=srcdbnew
[oracle@sqlaudit dbs]$ sqlplus / as sysdba
SQL> startup nomount;
[oracle@sqlaudit archive]$ cp /oracle/app/oracle/oradata/srcdb/redo01.log /oradata/srcdb_img/redo01.log
[oracle@sqlaudit archive]$ cp /oracle/app/oracle/oradata/srcdb/redo02.log /oradata/srcdb_img/redo02.log
[oracle@sqlaudit archive]$ cp /oracle/app/oracle/oradata/srcdb/redo03.log /oradata/srcdb_img/redo03.log
CREATE CONTROLFILE REUSE DATABASE "SRCDB" NORESETLOGS
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/oradata/srcdb_img/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/oradata/srcdb_img/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/oradata/srcdb_img/redo03.log' SIZE 50M BLOCKSIZE 512
DATAFILE
'/oradata/srcdb_img/SRCDB-LVL0-data_D-SRCDB_I-595837900_TS-SYSTEM_FNO-1_0nsq1niv',
'/oradata/srcdb_img/SRCDB-LVL0-data_D-SRCDB_I-595837900_TS-SYSAUX_FNO-2_0osq1nj2',
'/oradata/srcdb_img/SRCDB-LVL0-data_D-SRCDB_I-595837900_TS-UNDOTBS1_FNO-3_0qsq1njk',
'/oradata/srcdb_img/SRCDB-LVL0-data_D-SRCDB_I-595837900_TS-USERS_FNO-4_0rsq1njl',
'/oradata/srcdb_img/SRCDB-LVL0-data_D-SRCDB_I-595837900_TS-GGTBS_FNO-5_0psq1njh'
CHARACTER SET WE8MSWIN1252
;
SQL> SELECT NAME FROM V$DATAFILE;
[oracle@sqlaudit dbs]$ export ORACLE_SID=srcdb
SQL> startup mount;
RMAN> list backup of archivelog all;
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------
19 3.50K DISK 00:00:00 2018-01-31 07:48:46
BP Key: 19 Status: AVAILABLE Compressed: NO Tag: SRCDB-IMAGE
Piece Name: /oracle/app/oracle/product/11.2.0.4/db_1/dbs/15sq1nmu_1_1
List of Archived Logs in backup set 19
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 11 969636 2018-01-31 07:48:41 969648 2018-01-31 07:48:46
SQL> ALTER DATABASE REGISTER LOGFILE '/oracle/archive/1_11_961988430.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/oracle/archive/1_12_961988430.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/oracle/archive/1_13_961988430.dbf';
SQL> ALTER DATABASE REGISTER LOGFILE '/oracle/archive/1_14_961988430.dbf';
SQL> RECOVER DATABASE;
SQL> ALTER DATABASE OPEN;
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/srcdb_img/temp01.dbf' SIZE 100M AUTOEXTEND OFF;