首页 > 代码库 > Oracle手动删除归档日志厚,出现ORA-19571错误
Oracle手动删除归档日志厚,出现ORA-19571错误
一、使用以下的命令清理了空间:
1. cd /orabak 2. find . -type f -mtime +30 -exec rm -rf {} \;
二、然后开始使用rman备份的脚本进行备份,备份到最后出现以下报错
------------------------------------------------------------------------------------------- archive log filename=/oralog/1_20800_812554797.dbf recid=20799 stamp=839154512 archive log filename=/oralog/1_20801_812554797.dbf recid=20800 stamp=839154513 released channel: ch1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ch1 channel at 02/10/2014 10:33:46 ORA-19571: archived-log recid 19009 stamp 837863118 not found in control file -------------------------------------------------------------------------------------------
三、分析及处理过程
1、当手工删除了归档日志以后,Rman备份会检测到日志缺失,从而无法进一步继续执行。
所以此时需要手工执行crosscheck过程,之后Rman备份可以恢复正常。
2、Crosscheck日志
$ rman target / RMAN> crosscheck archivelog all;#Oracle 9i及以后的版本用crosscheck archivelog all; RMAN> change archivelog all crosscheck; #Oracle 8i中用change archivelog all crosscheck;
3、再次运行备份脚本
-- archive log filename=/oralog/1_20887_812554797.dbf recid=20886 stamp=839198925 archive log filename=/oralog/1_20888_812554797.dbf recid=20887 stamp=839198982 archive log filename=/oralog/1_20889_812554797.dbf recid=20888 stamp=839199982 archive log filename=/oralog/1_20890_812554797.dbf recid=20889 stamp=839199982 Finished backup at 10-FEB-14 Starting backup at 10-FEB-14 channel ch1: starting full datafile backupset channel ch1: specifying datafile(s) in backupset including current control file in backupset channel ch1: starting piece 1 at 10-FEB-14 channel ch1: finished piece 1 at 10-FEB-14 piece handle=/orabak/control_11839200079688 tag=TAG20140210T230759 comment=NONE channel ch1: backup set complete, elapsed time: 00:00:01 Finished backup at 10-FEB-14 released channel: ch1 -- 完成
4、参考资料
http://www.eygle.com/archives/2004/12/rman_crosscheck.html
5、rman的备份脚本
run{ allocate channel ch1 device type DISK; backup full filesperset 50 database format‘/orabak/full_%c_%p_%t_5s‘; sql ‘alter system archive log current‘; backup filesperset 50 archivelog all format ‘/orabak/arch%c%p%t%s‘ delete input; backup current controlfile format ‘/orabak/control_%c%p%t%s‘; release channel ch1; }
本文出自 “冰冻vs西瓜” 博客,请务必保留此出处http://molewan.blog.51cto.com/287340/1891365
Oracle手动删除归档日志厚,出现ORA-19571错误
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。