RMAN> delete obsolete;
......
RMAN-00571: ===========================================================
RMAN-00569: ====== ERROR MESSAGE STACK FOLLOWS =========
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 07/24/2012 11:07:13
RMAN-06091: no channel allocated for maintenance (of an appropriate type)
这里意思说分配通道的类型不合适。
RMAN> report obsolete;
.......
Backup Set 15444 08-11?-06
Backup Piece 15444 08-11?-06 /NMO_c-3649627009-20061108-19/
......
RMAN> list backupset summary;
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Tag
------- -- -- - ----------- --------------- ------- ------- ---
......
15444 B F A SBT_TAPE 08-11?-06 1 1
......
发现这些obsolete 的backupset都是备到磁带上的,而且是很早以前(08-11?-06
)做的备份,查看这些备份,发现已经被删除了,只是没有通过正规的途径删除导致记录还保留在controlfile中。
由于系统已不在使用sbt做备份设备,现在有两种方法处理这个问题:
1,使用delete noprompt obsolete device type disk; 这样只删除device type 为disk的obsolete备份集,不管sbt_tape类型的备份集也可。
2,删除sbt_tape类型的备份集。
RMAN> allocate channel for maintenance device type sbt
parms 'SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/tmp)';
RMAN> delete noprompt obsolete;
这样显示指定device type之后就可以删除用指定类型创建的备份集了。
参考文章:
Suppose your current backup strategy uses only disk, but you have several old tape
backups you want to get rid of. You can allocate a maintenance channel for performing the
deletion of the tape backups by using the dummy sbt API (because the media manager isn’t
available any longer). You can then use the delete obsolete command to remove the tape
backups. Here’s an example showing how to do those things:
RMAN> allocate channel for maintenance device type sbt
parms 'SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/tmp)';
RMAN> delete obsolete;
Although the media manager isn’t available any longer, RMAN simulates a callout to the
media management layer (MML) and successfully initiates the maintenance command to
delete the old tape backups you want toget rid of.