RMAN的crosscheck和obsolete的用法(3)

RMAN> list backup summary;
 
List of Backups
 ===============
 Key    TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
 ------- -- -- - ----------- --------------- ------- ------- ---------- ---
 1      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105231
 2      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105231
 3      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105231
 4      B  F  X DISK        10-MAR-14      1      1      NO        TAG20140310T105404
 5      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105404
 6      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105956
 7      B  F  A DISK        10-MAR-14      1      1      NO        TAG20140310T105956
 ---出现X
 
RMAN> delete noprompt obsolete;
 
RMAN retention policy will be applied to the command
 RMAN retention policy is set to redundancy 1
 using channel ORA_DISK_1
 Deleting the following obsolete backups and copies:
 Type                Key    Completion Time    Filename/Handle
 -------------------- ------ ------------------ --------------------
 Archive Log          1      10-MAR-14          /u01/app/Oracle/product/11.2.0.3/db_1/dbs/arch1_34_824748936.dbf
 Archive Log          2      10-MAR-14          /u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_35_824748936.dbf
 Archive Log          3      10-MAR-14          /u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_36_824748936.dbf
 Archive Log          4      10-MAR-14          /u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_37_824748936.dbf
 Backup Set          3      10-MAR-14       
  Backup Piece      3      10-MAR-14          /u01/backup/ora_full_03p2qnrn_1_1
 Backup Set          4      10-MAR-14       
  Backup Piece      4      10-MAR-14          /u01/backup/ora_system_04p2qnuc_1_1
 Backup Set          5      10-MAR-14       
  Backup Piece      5      10-MAR-14          /u01/backup/ora_system_05p2qnuf_1_1
 deleted archived log
 archived log file name=/u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_34_824748936.dbf RECID=1 STAMP=841833741
 deleted archived log
 archived log file name=/u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_35_824748936.dbf RECID=2 STAMP=841833743
 deleted archived log
 archived log file name=/u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_36_824748936.dbf RECID=3 STAMP=841833746
 deleted archived log
 archived log file name=/u01/app/oracle/product/11.2.0.3/db_1/dbs/arch1_37_824748936.dbf RECID=4 STAMP=841833748
 deleted backup piece
 backup piece handle=/u01/backup/ora_full_03p2qnrn_1_1 RECID=3 STAMP=841834360
 deleted backup piece
 backup piece handle=/u01/backup/ora_system_04p2qnuc_1_1 RECID=4 STAMP=841834444
 deleted backup piece
 backup piece handle=/u01/backup/ora_system_05p2qnuf_1_1 RECID=5 STAMP=841834448
 Deleted 7 objects
 ---删除违法的备份集。
 
---我们在查看一下备份集,
 RMAN> report obsolete;
 
RMAN retention policy will be applied to the command
 RMAN retention policy is set to redundancy 1
 no obsolete backups found
 

RMAN> crosscheck backup;
 
using channel ORA_DISK_1
 crosschecked backup piece: found to be 'AVAILABLE'
 backup piece handle=/u01/backup/ora_full_01p2qnrf_1_1 RECID=1 STAMP=841834351
 crosschecked backup piece: found to be 'AVAILABLE'
 backup piece handle=/u01/backup/ora_full_02p2qnrm_1_1 RECID=2 STAMP=841834358
 crosschecked backup piece: found to be 'AVAILABLE'
 backup piece handle=/u01/backup/ora_system_06p2qo9d_1_1 RECID=6 STAMP=841834797
 crosschecked backup piece: found to be 'AVAILABLE'
 backup piece handle=/u01/backup/ora_system_07p2qo9g_1_1 RECID=7 STAMP=841834801
 Crosschecked 4 objects
 ----无效的备份集已删除!!!!
 通过此次试验得出结论:crosscheck只能够检测备份集是否有效(最常见的情况就是物理上是否还存在),并且可以用它来删除失效(expired)的备份集,而不是用来删除违背备份策略(obsolete)的备份集,如果要删除违背备份策略(废弃)的备份集,需要使用obsolete操作。出现这个问题的主要原因应该是expired和obsolete翻译成中文的时候理解的出入导致的,是我理解上混淆概念!!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fd24c01992d3d2bec9d3d088f14939ad.html