Bo's Oracle Station

【博客文章2024】复杂备份策略研究:两种0级备份同时存在(镜像拷贝和备份集形式)的情况下,1级增量备份的应用研究

2024-4-25 16:15| 发布者: admin| 查看: 28| 评论: 0

摘要: 本博客进行复杂备份策略研究。详细分析两种0级备份同时存在(镜像拷贝和备份集形式)的情况下,1级增量备份的应用。博客研究的环境适用于既有0级镜像拷贝(用于定时更新)又有正常的0级备份集的生产环境,对之后的1级增量备份的制作和应用进行深入研究。
【博客文章2024】复杂备份策略研究:两种0级备份同时存在(镜像拷贝和备份集形式)的情况下,1级增量备份的应用研究




Author: Bo Tang

1. 0级镜像拷贝

    0级镜像拷贝用于之后的增量更新(这样就不需要担心0级备份随时间变化的陈旧问题):

RMAN> backup as copy tag '1D_WHOLE_INCR0' incremental level 0 database;   

Starting backup at 25-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/RACORCL/DATAFILE/system.283.1162980303
channel ORA_DISK_2: starting datafile copy
input datafile file number=00003 name=+DATA/RACORCL/DATAFILE/sysaux.295.1162980337
channel ORA_DISK_3: starting datafile copy
input datafile file number=00004 name=+DATA/RACORCL/DATAFILE/undotbs1.288.1162980353
channel ORA_DISK_4: starting datafile copy
input datafile file number=00005 name=+DATA/RACORCL/DATAFILE/undotbs2.301.1162980561
channel ORA_DISK_5: starting datafile copy
input datafile file number=00007 name=+DATA/RACORCL/DATAFILE/users.303.1162980353

output file name=+FRA/RACORCL/DATAFILE/undotbs2.277.1167206751 tag=1D_WHOLE_INCR0 RECID=1 STAMP=1167206750
channel ORA_DISK_4: datafile copy complete, elapsed time: 00:00:04
output file name=+FRA/RACORCL/DATAFILE/users.280.1167206751 tag=1D_WHOLE_INCR0 RECID=2 STAMP=1167206750
channel ORA_DISK_5: datafile copy complete, elapsed time: 00:00:03
output file name=+FRA/RACORCL/DATAFILE/sysaux.271.1167206749 tag=1D_WHOLE_INCR0 RECID=4 STAMP=1167206753
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:04
output file name=+FRA/RACORCL/DATAFILE/undotbs1.285.1167206751 tag=1D_WHOLE_INCR0 RECID=3 STAMP=1167206753
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:00:04
output file name=+FRA/RACORCL/DATAFILE/system.284.1167206751 tag=1D_WHOLE_INCR0 RECID=5 STAMP=1167206753
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:08

Finished backup at 25-APR-24

Starting Control File and SPFILE Autobackup at 25-APR-24
piece handle=+FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167206757.279.1167206757 comment=NONE
Finished Control File and SPFILE Autobackup at 25-APR-24


    0级镜像拷贝的SCN:

RMAN> list copy;

specification does not match any control file copy in the repository
specification does not match any archived log in the repository
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time        Sparse
------- ---- - --------------- ---------- --------------- ------
5       1    A 25-APR-24       2085515    25-APR-24       NO    
        Name: +FRA/RACORCL/DATAFILE/system.284.1167206751
        Tag: 1D_WHOLE_INCR0

4       3    A 25-APR-24       2085517    25-APR-24       NO    
        Name: +FRA/RACORCL/DATAFILE/sysaux.271.1167206749
        Tag: 1D_WHOLE_INCR0

3       4    A 25-APR-24       2085519    25-APR-24       NO    
        Name: +FRA/RACORCL/DATAFILE/undotbs1.285.1167206751
        Tag: 1D_WHOLE_INCR0

1       5    A 25-APR-24       2085520    25-APR-24       NO    
        Name: +FRA/RACORCL/DATAFILE/undotbs2.277.1167206751
        Tag: 1D_WHOLE_INCR0

2       7    A 25-APR-24       2085521    25-APR-24       NO    
        Name: +FRA/RACORCL/DATAFILE/users.280.1167206751
        Tag: 1D_WHOLE_INCR0
......

2. 0级备份集

    在0级镜像拷贝之后,再做一份正常的0级备份集(之前之后各会做一次日志切换,以把在线日志转换成归档日志,并备份):

RMAN> backup tag '2D_WHOLE_INCR0' incremental level 0 database plus archivelog delete all input;

Starting backup at 25-APR-24
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=7 RECID=6 STAMP=1167207043
channel ORA_DISK_1: starting piece 1 at 25-APR-24
channel ORA_DISK_2: starting archived log backup set
channel ORA_DISK_2: specifying archived log(s) in backup set
input archived log thread=2 sequence=4 RECID=7 STAMP=1167207043
channel ORA_DISK_2: starting piece 1 at 25-APR-24
channel ORA_DISK_1: finished piece 1 at 25-APR-24

piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.276.1167207043 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FRA/RACORCL/ARCHIVELOG/2024_04_25/thread_1_seq_7.283.1167207043 RECID=6 STAMP=1167207043
channel ORA_DISK_2: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.278.1167207043 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FRA/RACORCL/ARCHIVELOG/2024_04_25/thread_2_seq_4.281.1167207043 RECID=7 STAMP=1167207043

Finished backup at 25-APR-24

Starting backup at 25-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/RACORCL/DATAFILE/system.283.1162980303
channel ORA_DISK_1: starting piece 1 at 25-APR-24
channel ORA_DISK_2: starting incremental level 0 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/RACORCL/DATAFILE/sysaux.295.1162980337
channel ORA_DISK_2: starting piece 1 at 25-APR-24
channel ORA_DISK_3: starting incremental level 0 datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/RACORCL/DATAFILE/undotbs1.288.1162980353
channel ORA_DISK_3: starting piece 1 at 25-APR-24
channel ORA_DISK_4: starting incremental level 0 datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/RACORCL/DATAFILE/undotbs2.301.1162980561
channel ORA_DISK_4: starting piece 1 at 25-APR-24
channel ORA_DISK_5: starting incremental level 0 datafile backup set
channel ORA_DISK_5: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/RACORCL/DATAFILE/users.303.1162980353
channel ORA_DISK_5: starting piece 1 at 25-APR-24
channel ORA_DISK_4: finished piece 1 at 25-APR-24

piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.275.1167207045 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.281.1167207045 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_2: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.283.1167207045 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_3: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.264.1167207045 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_5: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.274.1167207049 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 00:00:03

Finished backup at 25-APR-24

Starting backup at 25-APR-24
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=8 RECID=8 STAMP=1167207049
channel ORA_DISK_1: starting piece 1 at 25-APR-24
channel ORA_DISK_2: starting archived log backup set
channel ORA_DISK_2: specifying archived log(s) in backup set
input archived log thread=2 sequence=5 RECID=9 STAMP=1167207049
channel ORA_DISK_2: starting piece 1 at 25-APR-24
channel ORA_DISK_1: finished piece 1 at 25-APR-24

piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.270.1167207049 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FRA/RACORCL/ARCHIVELOG/2024_04_25/thread_1_seq_8.273.1167207049 RECID=8 STAMP=1167207049
channel ORA_DISK_2: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.269.1167207049 tag=2D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=+FRA/RACORCL/ARCHIVELOG/2024_04_25/thread_2_seq_5.272.1167207049 RECID=9 STAMP=1167207049

Finished backup at 25-APR-24

Starting Control File and SPFILE Autobackup at 25-APR-24
piece handle=+FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167207050.272.1167207051 comment=NONE
Finished Control File and SPFILE Autobackup at 25-APR-24


3. 1级备份集

    在正常的0级备份集之后,做一份1级增量备份,该增量备份基于0级备份集‘’2D_WHOLE_INCR0

RMAN> backup tag '3D_WHOLE_INCR1' incremental level 1 database;

Starting backup at 25-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/RACORCL/DATAFILE/system.283.1162980303
channel ORA_DISK_1: starting piece 1 at 25-APR-24
channel ORA_DISK_2: starting incremental level 1 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/RACORCL/DATAFILE/sysaux.295.1162980337
channel ORA_DISK_2: starting piece 1 at 25-APR-24
channel ORA_DISK_3: starting incremental level 1 datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/RACORCL/DATAFILE/undotbs1.288.1162980353
channel ORA_DISK_3: starting piece 1 at 25-APR-24
channel ORA_DISK_4: starting incremental level 1 datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/RACORCL/DATAFILE/undotbs2.301.1162980561
channel ORA_DISK_4: starting piece 1 at 25-APR-24
channel ORA_DISK_5: starting incremental level 1 datafile backup set
channel ORA_DISK_5: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/RACORCL/DATAFILE/users.303.1162980353
channel ORA_DISK_5: starting piece 1 at 25-APR-24
channel ORA_DISK_1: finished piece 1 at 25-APR-24

piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.273.1167207423 tag=3D_WHOLE_INCR1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_2: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.268.1167207423 tag=3D_WHOLE_INCR1 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_3: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.267.1167207423 tag=3D_WHOLE_INCR1 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_4: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.266.1167207425 tag=3D_WHOLE_INCR1 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_5: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.261.1167207425 tag=3D_WHOLE_INCR1 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 00:00:01

Finished backup at 25-APR-24

Starting Control File and SPFILE Autobackup at 25-APR-24
piece handle=+FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167207425.262.1167207425 comment=NONE
Finished Control File and SPFILE Autobackup at 25-APR-24


4. 专用于恢复0级镜像拷贝的1级备份集

    再做一份1级增量备份,该增量备份专用于恢复0级镜像拷贝‘1D_WHOLE_INCR0

RMAN> backup tag '4D_WHOLE_INCR1' incremental level 1 for recover of copy with tag '1D_WHOLE_INCR0' database;

Starting backup at 25-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
RMAN-06787: warning:  TAG 4D_WHOLE_INCR1 option is ignored; backups will be tagged with 1D_WHOLE_INCR0
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/RACORCL/DATAFILE/system.283.1162980303
channel ORA_DISK_1: starting piece 1 at 25-APR-24
channel ORA_DISK_2: starting incremental level 1 datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/RACORCL/DATAFILE/sysaux.295.1162980337
channel ORA_DISK_2: starting piece 1 at 25-APR-24
channel ORA_DISK_3: starting incremental level 1 datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/RACORCL/DATAFILE/undotbs1.288.1162980353
channel ORA_DISK_3: starting piece 1 at 25-APR-24
channel ORA_DISK_4: starting incremental level 1 datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00005 name=+DATA/RACORCL/DATAFILE/undotbs2.301.1162980561
channel ORA_DISK_4: starting piece 1 at 25-APR-24
channel ORA_DISK_5: starting incremental level 1 datafile backup set
channel ORA_DISK_5: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/RACORCL/DATAFILE/users.303.1162980353
channel ORA_DISK_5: starting piece 1 at 25-APR-24
channel ORA_DISK_1: finished piece 1 at 25-APR-24

piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467 tag=1D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_2: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467 tag=1D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_3: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467 tag=1D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_4: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467 tag=1D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:00:04
channel ORA_DISK_5: finished piece 1 at 25-APR-24
piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469 tag=1D_WHOLE_INCR0 comment=NONE
channel ORA_DISK_5: backup set complete, elapsed time: 00:00:03

Finished backup at 25-APR-24

Starting Control File and SPFILE Autobackup at 25-APR-24
piece handle=+FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167208471.259.1167208471 comment=NONE
Finished Control File and SPFILE Autobackup at 25-APR-24


    我们制定的标签‘4D_WHOLE_INCR1’被忽略,该增量备份必需与0级镜像拷贝具有相同的标签‘1D_WHOLE_INCR0’。通过该标签,这个1级增量备份就会与那个0级镜像拷贝紧密相联系。当采用这种备份策略时,使用标签显得尤为重要。这样就可以明确用它来恢复与它相关的0级镜像拷贝。 

5. 列出1级备份集,并用其中的专用于恢复0级镜像拷贝的那份来恢复0级镜像拷贝

    下面命令输出中的‘3
D_WHOLE_INCR1'1D_WHOLE_INCR0'都是1级备份级

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11      Full    18.89M     DISK        00:00:00     25-APR-24      
        BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TAG20240425T080557
        Piece Name: +FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167206757.279.1167206757
  SPFILE Included: Modification time: 25-APR-24
  SPFILE db_unique_name: RACORCL
  Control File Included: Ckp SCN: 2085534      Ckp time: 25-APR-24

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
12      2.40M      DISK        00:00:00     25-APR-24      
        BP Key: 12   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.276.1167207043

  List of Archived Logs in backup set 12
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    7       2078008    07-MAR-24 2085777    25-APR-24

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
13      1.82M      DISK        00:00:00     25-APR-24      
        BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.278.1167207043

  List of Archived Logs in backup set 13
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    4       2078730    25-APR-24 2085781    25-APR-24

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14      Incr 0  2.38M      DISK        00:00:01     25-APR-24      
        BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.275.1167207045
  List of Datafiles in backup set 14
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5    0  Incr 2085802    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs2.301.1162980561

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
15      Incr 0  388.27M    DISK        00:00:02     25-APR-24      
        BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.283.1167207045
  List of Datafiles in backup set 15
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  3    0  Incr 2085799    25-APR-24              NO    +DATA/RACORCL/DATAFILE/sysaux.295.1162980337

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
16      Incr 0  341.97M    DISK        00:00:02     25-APR-24      
        BP Key: 16   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.264.1167207045
  List of Datafiles in backup set 16
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  4    0  Incr 2085800    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs1.288.1162980353

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
17      Incr 0  779.59M    DISK        00:00:03     25-APR-24      
        BP Key: 17   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.281.1167207045
  List of Datafiles in backup set 17
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1    0  Incr 2085797    25-APR-24              NO    +DATA/RACORCL/DATAFILE/system.283.1162980303

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
18      Incr 0  2.38M      DISK        00:00:03     25-APR-24      
        BP Key: 18   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.274.1167207049
  List of Datafiles in backup set 18
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  7    0  Incr 2085804    25-APR-24              NO    +DATA/RACORCL/DATAFILE/users.303.1162980353

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
19      4.50K      DISK        00:00:00     25-APR-24      
        BP Key: 19   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.270.1167207049

  List of Archived Logs in backup set 19
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    8       2085777    25-APR-24 2085812    25-APR-24

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
20      4.50K      DISK        00:00:00     25-APR-24      
        BP Key: 20   Status: AVAILABLE  Compressed: NO  Tag: 2D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/annnf0_2d_whole_incr0_0.269.1167207049

  List of Archived Logs in backup set 20
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  2    5       2085781    25-APR-24 2085816    25-APR-24

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
21      Full    18.89M     DISK        00:00:00     25-APR-24      
        BP Key: 21   Status: AVAILABLE  Compressed: NO  Tag: TAG20240425T081050
        Piece Name: +FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167207050.272.1167207051
  SPFILE Included: Modification time: 25-APR-24
  SPFILE db_unique_name: RACORCL
  Control File Included: Ckp SCN: 2085833      Ckp time: 25-APR-24

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
22      Incr 1  3.99M      DISK        00:00:01     25-APR-24      
        BP Key: 22   Status: AVAILABLE  Compressed: NO  Tag: 3D_WHOLE_INCR1
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.267.1167207423
  List of Datafiles in backup set 22
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  4    1  Incr 2091068    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs1.288.1162980353

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
23      Incr 1  20.02M     DISK        00:00:02     25-APR-24      
        BP Key: 23   Status: AVAILABLE  Compressed: NO  Tag: 3D_WHOLE_INCR1
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.268.1167207423
  List of Datafiles in backup set 23
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  3    1  Incr 2091066    25-APR-24              NO    +DATA/RACORCL/DATAFILE/sysaux.295.1162980337

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
24      Incr 1  4.03M      DISK        00:00:02     25-APR-24      
        BP Key: 24   Status: AVAILABLE  Compressed: NO  Tag: 3D_WHOLE_INCR1
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.266.1167207425
  List of Datafiles in backup set 24
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5    1  Incr 2091069    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs2.301.1162980561

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
25      Incr 1  48.00K     DISK        00:00:02     25-APR-24      
        BP Key: 25   Status: AVAILABLE  Compressed: NO  Tag: 3D_WHOLE_INCR1
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.261.1167207425
  List of Datafiles in backup set 25
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  7    1  Incr 2091070    25-APR-24              NO    +DATA/RACORCL/DATAFILE/users.303.1162980353

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
26      Incr 1  608.00K    DISK        00:00:02     25-APR-24      
        BP Key: 26   Status: AVAILABLE  Compressed: NO  Tag: 3D_WHOLE_INCR1
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_3d_whole_incr1_0.273.1167207423
  List of Datafiles in backup set 26
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1    1  Incr 2091064    25-APR-24              NO    +DATA/RACORCL/DATAFILE/system.283.1162980303

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
27      Full    18.89M     DISK        00:00:00     25-APR-24      
        BP Key: 27   Status: AVAILABLE  Compressed: NO  Tag: TAG20240425T081705
        Piece Name: +FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167207425.262.1167207425
  SPFILE Included: Modification time: 25-APR-24
  SPFILE db_unique_name: RACORCL
  Control File Included: Ckp SCN: 2091081      Ckp time: 25-APR-24

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
28      Incr 1  4.69M      DISK        00:00:01     25-APR-24      
        BP Key: 28   Status: AVAILABLE  Compressed: NO  Tag: 1D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467
  List of Datafiles in backup set 28
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5    1  Incr 2095303    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs2.301.1162980561

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
29      Incr 1  4.04M      DISK        00:00:02     25-APR-24      
        BP Key: 29   Status: AVAILABLE  Compressed: NO  Tag: 1D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467
  List of Datafiles in backup set 29
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  4    1  Incr 2095301    25-APR-24              NO    +DATA/RACORCL/DATAFILE/undotbs1.288.1162980353

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
30      Incr 1  21.73M     DISK        00:00:02     25-APR-24      
        BP Key: 30   Status: AVAILABLE  Compressed: NO  Tag: 1D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467
  List of Datafiles in backup set 30
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  3    1  Incr 2095299    25-APR-24              NO    +DATA/RACORCL/DATAFILE/sysaux.295.1162980337

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
31      Incr 1  752.00K    DISK        00:00:02     25-APR-24      
        BP Key: 31   Status: AVAILABLE  Compressed: NO  Tag: 1D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467
  List of Datafiles in backup set 31
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1    1  Incr 2095297    25-APR-24              NO    +DATA/RACORCL/DATAFILE/system.283.1162980303

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
32      Incr 1  48.00K     DISK        00:00:02     25-APR-24      
        BP Key: 32   Status: AVAILABLE  Compressed: NO  Tag: 1D_WHOLE_INCR0
        Piece Name: +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469
  List of Datafiles in backup set 32
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  7    1  Incr 2095307    25-APR-24              NO    +DATA/RACORCL/DATAFILE/users.303.1162980353

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
33      Full    18.89M     DISK        00:00:00     25-APR-24      
        BP Key: 33   Status: AVAILABLE  Compressed: NO  Tag: TAG20240425T083431
        Piece Name: +FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167208471.259.1167208471
  SPFILE Included: Modification time: 25-APR-24
  SPFILE db_unique_name: RACORCL
  Control File Included: Ckp SCN: 2095316      Ckp time: 25-APR-24


    使用'1D_WHOLE_INCR0'来恢复0级镜像拷贝,使其SCN向前推进:

RMAN> recover copy of database with tag '1D_WHOLE_INCR0';

Starting recover at 25-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile copies to recover
recovering datafile copy file number=00001 name=+FRA/RACORCL/DATAFILE/system.284.1167206751
channel ORA_DISK_1: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467
channel ORA_DISK_2: starting incremental datafile backup set restore
channel ORA_DISK_2: specifying datafile copies to recover
recovering datafile copy file number=00003 name=+FRA/RACORCL/DATAFILE/sysaux.271.1167206749
channel ORA_DISK_2: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467
channel ORA_DISK_3: starting incremental datafile backup set restore
channel ORA_DISK_3: specifying datafile copies to recover
recovering datafile copy file number=00004 name=+FRA/RACORCL/DATAFILE/undotbs1.285.1167206751
channel ORA_DISK_3: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467
channel ORA_DISK_4: starting incremental datafile backup set restore
channel ORA_DISK_4: specifying datafile copies to recover
recovering datafile copy file number=00005 name=+FRA/RACORCL/DATAFILE/undotbs2.277.1167206751
channel ORA_DISK_4: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467
channel ORA_DISK_5: starting incremental datafile backup set restore
channel ORA_DISK_5: specifying datafile copies to recover
recovering datafile copy file number=00007 name=+FRA/RACORCL/DATAFILE/users.280.1167206751
channel ORA_DISK_5: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469
channel ORA_DISK_1: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
channel ORA_DISK_3: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:00:01
channel ORA_DISK_4: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_4: restore complete, elapsed time: 00:00:01
channel ORA_DISK_5: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469 tag=1D_WHOLE_INCR0
channel ORA_DISK_5: restored backup piece 1
channel ORA_DISK_5: restore complete, elapsed time: 00:00:01
Finished recover at 25-APR-24

Starting Control File and SPFILE Autobackup at 25-APR-24
piece handle=+FRA/RACORCL/AUTOBACKUP/2024_04_25/s_1167209104.258.1167209105 comment=NONE
Finished Control File and SPFILE Autobackup at 25-APR-24


    注意与之前的0级镜像拷贝的SCN作对比,SCN变大:

RMAN> list copy;

using target database control file instead of recovery catalog
specification does not match any control file copy in the repository
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time        Sparse
------- ---- - --------------- ---------- --------------- ------
6       1    A 25-APR-24       2095297    25-APR-24       NO
        Name: +FRA/RACORCL/DATAFILE/system.284.1167206751
        Tag: 1D_WHOLE_INCR0

10      3    A 25-APR-24       2095299    25-APR-24       NO
        Name: +FRA/RACORCL/DATAFILE/sysaux.271.1167206749
        Tag: 1D_WHOLE_INCR0

8       4    A 25-APR-24       2095301    25-APR-24       NO
        Name: +FRA/RACORCL/DATAFILE/undotbs1.285.1167206751
        Tag: 1D_WHOLE_INCR0

9       5    A 25-APR-24       2095303    25-APR-24       NO
        Name: +FRA/RACORCL/DATAFILE/undotbs2.277.1167206751
        Tag: 1D_WHOLE_INCR0

7       7    A 25-APR-24       2095307    25-APR-24       NO
        Name: +FRA/RACORCL/DATAFILE/users.280.1167206751
        Tag: 1D_WHOLE_INCR0
......

6. 模拟数据库数据文件损坏,执行恢复,观察1级备份的应用情况

    模拟数据库数据文件损坏:    

oracle@station11 ~]$ srvctl stop database -d racorcl -o abort 

[root@station11 ~]# su - grid
Last login: Fri Apr 26 05:56:07 CST 2024
[grid@station11 ~]$ asmcmd
ASMCMD> ls
DATA/
FRA/
ASMCMD> cd data
ASMCMD> ls
ASM/
RACORCL/
_MGMTDB/
cluster11/
orapwasm
orapwasm_backup
ASMCMD> cd RACORCL/
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
PASSWORD/
TEMPFILE/
ASMCMD> cd DATAFILE/
ASMCMD> ls
SYSAUX.295.1162980337
SYSTEM.283.1162980303
UNDOTBS1.288.1162980353
UNDOTBS2.301.1162980561
USERS.303.1162980353
ASMCMD> rm *
You may delete multiple files and/or directories.
Are you sure? (y/n) y
ASMCMD>  


    还原‘2D_WHOLE_INCR0’执行恢复,观察1级备份的应用情况:

[oracle@station11 ~]$ sqlplus  /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Fri Apr 26 06:06:25 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 4949276568 bytes
Fixed Size            8906648 bytes
Variable Size         1056964608 bytes
Database Buffers     3875536896 bytes
Redo Buffers            7868416 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '+DATA/RACORCL/DATAFILE/system.283.1162980303'


SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0


RMAN> restore database from tag '2D_WHOLE_INCR0';

Starting restore at 26-APR-24
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1591 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=1712 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=249 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=371 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=1592 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_6
channel ORA_DISK_6: SID=1713 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_7
channel ORA_DISK_7: SID=1836 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_8
channel ORA_DISK_8: SID=5 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_9
channel ORA_DISK_9: SID=128 instance=racorcl1 device type=DISK
allocated channel: ORA_DISK_10
channel ORA_DISK_10: SID=250 instance=racorcl1 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00005 to +DATA/RACORCL/DATAFILE/undotbs2.301.1162980561
channel ORA_DISK_1: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.275.1167207045
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00003 to +DATA/RACORCL/DATAFILE/sysaux.295.1162980337
channel ORA_DISK_2: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.283.1167207045
channel ORA_DISK_3: starting datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_DISK_3: restoring datafile 00004 to +DATA/RACORCL/DATAFILE/undotbs1.288.1162980353
channel ORA_DISK_3: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.264.1167207045
channel ORA_DISK_4: starting datafile backup set restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
channel ORA_DISK_4: restoring datafile 00001 to +DATA/RACORCL/DATAFILE/system.283.1162980303
channel ORA_DISK_4: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.281.1167207045
channel ORA_DISK_5: starting datafile backup set restore
channel ORA_DISK_5: specifying datafile(s) to restore from backup set
channel ORA_DISK_5: restoring datafile 00007 to +DATA/RACORCL/DATAFILE/users.303.1162980353
channel ORA_DISK_5: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.274.1167207049
channel ORA_DISK_1: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.275.1167207045 tag=2D_WHOLE_INCR0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_3: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.264.1167207045 tag=2D_WHOLE_INCR0
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:00:04
channel ORA_DISK_5: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.274.1167207049 tag=2D_WHOLE_INCR0
channel ORA_DISK_5: restored backup piece 1
channel ORA_DISK_5: restore complete, elapsed time: 00:00:03
channel ORA_DISK_2: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.283.1167207045 tag=2D_WHOLE_INCR0
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:08
channel ORA_DISK_4: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn0_2d_whole_incr0_0.281.1167207045 tag=2D_WHOLE_INCR0
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_4: restore complete, elapsed time: 00:00:08
Finished restore at 26-APR-24


    从下图看出:1级备份‘1D_WHOLE_INC0’包含‘3D_WHOLE_INCR1’(做过标签的与0级镜像拷贝相联系的‘1D_WHOLE_INCR0’相当于1级累积增量备份):


RMAN> recover database;

Starting recover at 26-APR-24
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
using channel ORA_DISK_6
using channel ORA_DISK_7
using channel ORA_DISK_8
using channel ORA_DISK_9
using channel ORA_DISK_10
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: +DATA/RACORCL/DATAFILE/system.295.1167286899
channel ORA_DISK_1: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467
channel ORA_DISK_2: starting incremental datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: +DATA/RACORCL/DATAFILE/sysaux.288.1167286897
channel ORA_DISK_2: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467
channel ORA_DISK_3: starting incremental datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: +DATA/RACORCL/DATAFILE/undotbs1.303.1167286897
channel ORA_DISK_3: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467
channel ORA_DISK_4: starting incremental datafile backup set restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
destination for restore of datafile 00005: +DATA/RACORCL/DATAFILE/undotbs2.301.1167286897
channel ORA_DISK_4: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467
channel ORA_DISK_5: starting incremental datafile backup set restore
channel ORA_DISK_5: specifying datafile(s) to restore from backup set
destination for restore of datafile 00007: +DATA/RACORCL/DATAFILE/users.283.1167286899
channel ORA_DISK_5: reading from backup piece +FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469
channel ORA_DISK_1: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.263.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:00
channel ORA_DISK_2: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.282.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
channel ORA_DISK_3: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.265.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:00:01
channel ORA_DISK_4: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.256.1167208467 tag=1D_WHOLE_INCR0
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_4: restore complete, elapsed time: 00:00:01
channel ORA_DISK_5: piece handle=+FRA/RACORCL/BACKUPSET/2024_04_25/nnndn1_1d_whole_incr0_0.260.1167208469 tag=1D_WHOLE_INCR0
channel ORA_DISK_5: restored backup piece 1
channel ORA_DISK_5: restore complete, elapsed time: 00:00:01

starting media recovery
media recovery complete, elapsed time: 00:00:04

Finished recover at 26-APR-24

RMAN> alter database open ;

Statement processed

RMAN>




路过

雷人

握手

鲜花

鸡蛋

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-30 17:16 , Processed in 0.025462 second(s), 21 queries .

返回顶部