一、使用以下的命令清理了空间:
1.cd/orabak 2.find.-typef-mtime+30-execrm-rf{}\;
二、然后开始使用rman备份的脚本进行备份,备份到最后出现以下报错
------------------------------------------------------------------------------------------- archivelogfilename=/oralog/1_20800_812554797.dbfrecid=20799stamp=839154512 archivelogfilename=/oralog/1_20801_812554797.dbfrecid=20800stamp=839154513 releasedchannel:ch1 RMAN-00571:=========================================================== RMAN-00569:===============ERRORMESSAGESTACKFOLLOWS=============== RMAN-00571:=========================================================== RMAN-03009:failureofbackupcommandonch1channelat02/10/201410:33:46 ORA-19571:archived-logrecid19009stamp837863118notfoundincontrolfile -------------------------------------------------------------------------------------------
三、分析及处理过程
1、当手工删除了归档日志以后,Rman备份会检测到日志缺失,从而无法进一步继续执行。
所以此时需要手工执行crosscheck过程,之后Rman备份可以恢复正常。
2、Crosscheck日志
$rmantarget/ RMAN>crosscheckarchivelogall;#Oracle9i及以后的版本用crosscheckarchivelogall; RMAN>changearchivelogallcrosscheck;#Oracle8i中用changearchivelogallcrosscheck;
3、再次运行备份脚本
-- archivelogfilename=/oralog/1_20887_812554797.dbfrecid=20886stamp=839198925archivelogfilename=/oralog/1_20888_812554797.dbfrecid=20887stamp=839198982archivelogfilename=/oralog/1_20889_812554797.dbfrecid=20888stamp=839199982archivelogfilename=/oralog/1_20890_812554797.dbfrecid=20889stamp=839199982Finishedbackupat10-FEB-14 Startingbackupat10-FEB-14 channelch1:startingfulldatafilebackupsetchannelch1:specifyingdatafile(s)inbackupsetincludingcurrentcontrolfileinbackupsetchannelch1:startingpiece1at10-FEB-14channelch1:finishedpiece1at10-FEB-14piecehandle=/orabak/control_11839200079688tag=TAG20140210T230759comment=NONEchannelch1:backupsetcomplete,elapsedtime:00:00:01Finishedbackupat10-FEB-14 releasedchannel:ch1 -- 完成
4、参考资料
http://www.eygle.com/archives/2004/12/rman_crosscheck.html
5、rman的备份脚本
run{ allocatechannelch1devicetypeDISK; backupfullfilesperset50 databaseformat'/orabak/full_%c_%p_%t_5s'; sql'altersystemarchivelogcurrent'; backupfilesperset50archivelogall format'/orabak/arch%c%p%t%s'deleteinput; backupcurrentcontrolfile format'/orabak/control_%c%p%t%s'; releasechannelch1; }