Monday, 11 May 2015

RMAN-06054 Media Recovery requesting unknown log

Recovery is a very complex Oracle topic. When a database is lost or damaged, beeing able to recover it is the top priority. A production database should always run on ARCHIVELOG mode and should have implemented a solid backup strategy.
But sometimes people run databases on NOARCHIVELOG mode, and implement cold backup strategies. Sometimes If you ever had this choice and you’re trying to recover your database with your RMAN cold backups , then one time or another you’ll hit error: RMAN-06054: Media Recovery requesting unknown log.
Take a look of the following example trying to recover a NOARCHIVELOG mode database with RMAN:

RMAN> recover database;
Starting recover at 11-SEP-10
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1027 instance=neo devtype=DISK

starting media recovery
unable to find archive log
archive log thread=1 sequence=769
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/09/2010 14:25:14
RMAN-06054: media recovery requesting unknown log: thread 1 seq 769 lowscn 74863819

The cause of this RMAN-06054 error is because RMAN cannot find the online redo log files. In this case, Oracle database is running in NOARCHIVELOG mode and cannot perform complete recovery. So here we have 2 solutions:
SOLUTION 1:
The correct command to issue RMAN recovery in NOARCHIVELOG mode is:

RMAN> recover database noredo;
RMAN> alter database open resetlogs;

SOLUTION 2:
If the first solution fails we may issue fake recovery in SQL*PLUS as follows (but first ensure  you do not have the online redo log files)

SQL> recover database until cancel;
type cancel out immediately
SQL> alter database open resetlogs;

No comments:

Post a Comment