RMAN-06091 no channel allocated for maintenance
系統(tǒng):CentOS7.4
數(shù)據(jù)庫(kù):11.2.0.4
run塊語(yǔ)句如下:
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
report obsolete;
crosscheck backup;
delete noprompt obsolete;
backup as compressed backupset database format‘/dbbak/db_%U.bak’ plus archivelog format ‘/dbbak/arc_%U.bak’;
backup current controlfile format ‘/dbbak/ctl_%U.bak’;
delete noprompt archivelog until time ‘sysdate-14’;
release channel c1;
release channel c2;
release channel c3;
}
異常描述:在執(zhí)行rman備份時(shí),報(bào)錯(cuò)RMAN-06091,如下所示:

造成此異常是由于rman備份通道被調(diào)整為非磁盤(pán)通道所致,而默認(rèn)的通道為磁盤(pán)通道,所以delete noprompt obsolete命令不會(huì)成功.
查看當(dāng)前rman通道設(shè)置:
RMAN>show all;
CONFIGUREDEFAULT DEVICE TYPE TO DISK; # default
解決方案:
方案1:
在run塊外添加allocatechannel for maintenance type disk;
方案2:
在run塊里的delete后添加devicetype disk,如下:
delete noprompt obsoletedevice type disk;
delete noprompt archivelog until time ‘sysdate-14’device type disk;
