最近网友遇到一个问题,使用crosscheck backupset之后,提示所有备份集都为available状态,当他执行delete obsolete时,提示有两个文件需要删除。
实际上,obsolete的backupset的状态也会是AVAILABLE的。
对于OBSOLETE的备份集做删除操作,最好是按照如下步骤:
1.crosscheck backupset;
2.report obsolete;
3.delete obsolete;
这样应该比较清晰。
测试:
RMAN> crosscheck backupset;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=22 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/app/oracle/product/11.2.0/db_1/dbs/18og8thi_1_1 RECID=51 STAMP=822375986
省略多行
RMAN>report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 37 02-AUG-13
Backup Piece 51 02-AUG-13 /oracle/app/oracle/product/11.2.0/db_1/dbs/18og8thi_1_1
Backup Set 38 02-AUG-13
Backup Piece 52 02-AUG-13 /oracle/app/oracle/product/11.2.0/db_1/dbs/19og8tjt_1_1
Backup Set 65 18-MAR-14
Backup Piece 79 18-MAR-14 /oracle/app/oracle/product/11.2.0/db_1/dbs/24p3f1kl_1_1
最后一个检测到的obsolete状态backupset的号是65,下面查看65号backupset的状态:
RMAN> list backupset 65
2> ;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
65 Full 9.36M DISK 00:00:02 18-MAR-14
BP Key: 79 Status: AVAILABLE Compressed: NO Tag: TAG20140318T034213
Piece Name: /oracle/app/oracle/product/11.2.0/db_1/dbs/24p3f1kl_1_1
Control File Included: Ckp SCN: 2967001 Ckp time: 18-MAR-14
RMAN>
可以看到obsolete状态的backupset备份集状态也是:AVAILABLE
阅读(8725) | 评论(0) | 转发(0) |