RMAN-ERROR:因为找不到过期和丢失的归档日志而备份失败

发布时间 2023-11-16 11:59:59作者: 雪竹子

oracle RMAN ERROR

oracle采用rman备份,但是备份过程中报错如下:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 05/03/2018 15:30:02
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /oracle/archlog/cross/1_40137_869580905.dbf
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

备份脚本如下:

rman target / log=$BACKUPDIR/$DATA/$LOGFILE << EOF
run{
        allocate channel ch00 type disk maxpiecesize=4096M;
        allocate channel ch01 type disk maxpiecesize=4096M;
        backup as compressed backupset full database format '$BACKUPDIR/$DATA/${ORACLE_SID}_level0_%d_%T_%s_%p' plus archivelog format '$BACKUPDIR/$DATA/${ORACLE_SID}_arc_%d_%T_%s_%p' delete all input;
        backup current controlfile format '$BACKUPDIR/$DATA/${ORACLE_SID}_control_%d_%T_%s_%p';
        backup spfile format '$BACKUPDIR/$DATA/${ORACLE_SID}_spfile_%d_%T_%s_%p';
        release channel ch00;
        release channel ch01;
}
exit;
EOF

问题分析:

通过报错信息: expected archived log not found,而备份脚本采用了plus archivelog,
分析找到问题:因为找不到过期的归档日志而备份失败。

解决方法:

点击(此处)折叠或打开

  1. RMAN target /
  2. RMAN> CROSSCHECK ARCHIVELOG ALL;
  3. MRAN> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;