Friday, November 11, 2011

RMAN-06059

Have you tried to backup your database after a recorery and ran into the following error: 

RMAN-06059: expected archived log not found

Starting backup
current log archived
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11:32:04
RMAN-06059: expected archived log not found, lost of archived log 
compromises recoverability
ORA-19625: error identifying file /oracle/oradata/orcl/archive/1_2343.arc
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory

This can happen for a variety of reasons; the file has been manually moved or deleted, the archive log destination has recently been changed, the file has been renamed, etc..

Your options are either to restore the missing file(s) (if you have it), or to perform a crosscheck. If you don't have the file and need to get your database backup up you can perform a crosscheck to let the control file know the file is no longer available.

When an archive log crosscheck is performed, RMAN checks each archive log in turn to make sure that it exists on disk (or tape). Those that are missing are marked as unavailable. If you have got missing logs, this won't bring them back. It will allow you to get past this error and back-up the database though.

RMAN> crosscheck archivelog all;
.....

RMAN> list expired archivelog all;
.....

RMAN> delete noprompt expired archivelog all;
.....

Because we are missing an archivelog the backups from before this open resetlog operation are no longer good.  
We need to make a whole closed database backup now!

RMAN> shutdown immediate;

RMAN> startup mount;

RMAN> backup database;

RMAN> alter database open;

RMAN> exit


Are you a System Administrator that has been forced to also perform Oracle DBA tasks?  Would you like to avoid these time-consuming tasks so you can concentrate on your normal full-time duties?   Contact me to find out how you can have full-time Senior Oracle database administration support for as little as $500 / month.

No comments:

Post a Comment