Sunday, 2 December 2012

RMAN-06059: expected archived log not found



One of our regularly scheduled jobs on PROD which backed up the archivelogs each day failed with the error message below:


RMAN-03002: failure of backup command
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file /Disk2/Oraclelogs/LOGS/LOG_246800_1.ARC
ORA-27041: unable to open file
OSD-04002: unable to open file



The Cause


This happened because I had previously restored these two archivelogs to disk on PROD from a backup because we needed to use them for our data guard environment.



The Solution

First of all physically delete any files that you no longer require. Then, from RMAN on your production server, log in and issue the following:




CROSSCHECK ARCHIVELOG ALL;

This will ensure that RMAN has marked the logs which are not there as EXPIRED in the control file or recovery catalog, depending on which one you are using, so that they can easily be deleted from the catalog and/or control file of the database. The command below will prompt you before it removes the files, and will show you which files it will attempt to delete.

DELETE EXPIRED ARCHIVELOG ALL;


Next all you have to do is re-run the backup command and it should work

No comments:

Post a Comment