同事收到告警磁盘空间不足,说删除归档无法直接在rman中进行操作,让帮看下,具体处理方法如下:
一、错误信息
在rman执行命令
crosscheck archivelog all;
delete noprompt archivelog all completed before 'sysdate-30';
报错信息如下
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 03/28/2018 19:31:03
RMAN-06091: no channel allocated for maintenance (of an appropriate type)
根据错误日志提示可以判断由于rman备份通道调整为非磁盘通道,而默认我们设置的通道只磁盘通道,所以这里无法直接通过上述命令删除
二、解决方案
通过命令查看当前rman通道设置
RMAN> show all;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
日常备份通过NBU备份,所以需要调整磁盘通道维护状态为磁盘
allocate channel for maintenance type disk;
然后进行上述删除操作。
其他参考命令:
delete obsolete device type disk;
allocate channel for maintenance device type 'sbt_tape' ;