Search This Blog

Tuesday, January 17, 2017

RMAN-06136: ORACLE error from auxiliary database: ORA-01194: file 35 needs more recovery to be consistent

Error :

sql statement: create spfile from memory
"rman_backup_duplicate_latest.log" 1120 lines, 52181 characters
datafile 59 switched to datafile copy
input datafile copy RECID=58 STAMP=933523368 file name=/a02/oraclone/CLONE/data/a_txn_data08.dbf
datafile 60 switched to datafile copy
input datafile copy RECID=59 STAMP=933523368 file name=/a02/oraclone/CLONE/data/sysaux02.dbf
datafile 61 switched to datafile copy
input datafile copy RECID=60 STAMP=933523368 file name=/a02/oraclone/CLONE/data/a_archive02.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

released channel: ch01
released channel: ch02
released channel: ch03
released channel: ch04
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 01/17/2017 16:02:50
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06136: ORACLE error from auxiliary database: ORA-01194: file 35 needs more recovery to be consistent
ORA-01110: data file 35: '/a02/oraclone/CLONE/data/sysaux01.dbf'

Recovery Manager complete.
~

Cause :

Target database (CLONE) was running in noarchivelog mode where as source database (PROD) backup was taken with archivelogs. Obviously you cant see any production database to run in noarchvielog mode. Due to this rman was unable to recover the datafiles which will not allow you to open the database as well.

Fix :

- Start the instance in nomount state
- Trigger the duplicate through RMAN
- Wait till RMAN restoring the controlfile and mount the database
- Connect as sysdba through other session and make the database into noarchivelog mode when rman restoring data files.

If the above does not work add _allow_log_corruption = 'true' in pfile and retry.

After this RMAN was able to complete the duplication without any issue.

Please find the command i used :

connect auxiliary sys/change_on_install@CLONE

RUN
{
ALLOCATE AUXILIARY CHANNEL ch01 device type disk;
ALLOCATE AUXILIARY CHANNEL ch02 device type disk;
ALLOCATE AUXILIARY CHANNEL ch03 device type disk;
ALLOCATE AUXILIARY CHANNEL ch04 device type disk;

SET UNTIL TIME = "TO_DATE('2016-12-12 22:15:00', 'YYYY-MM-DD HH24:MI:SS')";
DUPLICATE DATABASE TO 'clone' backup location ='/a02/oraclone/CLONE/backup/RMAN_BKP_Mon_12Dec2016/';

RELEASE CHANNEL ch01;
RELEASE CHANNEL ch02;
RELEASE CHANNEL ch03;
RELEASE CHANNEL ch04;
}



No comments:

Post a Comment

You cannot complete this task because one of the following events caused a loss of page data: A system failure has occurred "Front end is locked after 12.2 upgrade"

  If you have upgraded to Oracle E-Business Suite 12.2.10 Release Update Pack from Oracle E-Business Suite 12.2.6 Release Update Pack (or ea...