Thursday, January 15, 2009

Forcing a database to open in case of ORA-01194 and ORA-01110 errors

Problem Summary:
SQL> startup mount
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 32514 generated at 12/26/2001 17:47:47 needed for thread 1
ORA-00280: change 32514 for thread 1 is in sequence #7


Specify log: {=suggested | filename | AUTO | CANCEL}
ORA-00279: change 32546 generated at 01/15/2002 17:01:06 needed for thread 1
ORA-00289: suggestion : /oradb/npap/archives/arch8.arc
ORA-00280: change 32546 for thread 1 is in sequence #8
ORA-00278: log file '/oradb/npap/archives/arch7.arc' no longer needed for this
recovery
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oradb/npap/system01.dbf'

ORA-01112: media recovery not started

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/oradb/npap/system01.dbf'

Got the above errors while executing ‘alter database open resetlogs’
After cloning a DB.



Solution:
If you have issues after cloning a database and you cannot open the database using the resetlogs option, you can add the following paramater to the init.ora file, restart the instance and try again:

_allow_resetlogs_corruption = true

No comments: