In my test server during migration from Oracle Database 11.2.0.3 to 11.2.0.4. i have faced below errors. i had no backup of the database. here, i'm sharing my experience to recover the Database using redolog files.
When i tried to connect to database i faced this error.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
ORA-01207: file is more recent than control file - old control file
Check the files required recovery.
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- ---------
1 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
2 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
3 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
4 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
5 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
Execute the recover database command using controlfile. it will prompt for redolog files.
provide complete path of the redo log files and observer the output of results.
SQL> recover database until cancel using backup controlfile;
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u02/app/oracle/oradata/db11g/redo01.log
ORA-00328: archived log ends at change 2053116, need later change 2061969
ORA-00334: archived log: '/u02/app/oracle/oradata/db11g/redo01.log'
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
Alter applying one redo log file. i tried to open the database with resetlogs. but still error message, datafile was not restored from sufficient backp.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
Execute the recover database command again and enter the second redo log file.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 2061969 generated at 03/17/2016 21:31:59 needed for thread 1
ORA-00289: suggestion : /u02/app/oracle/fast_recovery_area/DB11G/archivelog/2016_03_18/o1_mf_1_65_%u_.arc
ORA-00280: change 2061969 for thread 1 is in sequence #65
This time i seen the message Media recovery complete.
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u02/app/oracle/oradata/db11g/redo02.log
Log applied.
Media recovery complete.
Then open the Database with resetlogs.
SQL> alter database open resetlogs;
Database altered.
Verify the status of the Database.
SQL> select status from v$instance;
STATUS
------------
OPEN
When i tried to connect to database i faced this error.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
ORA-01207: file is more recent than control file - old control file
Check the files required recovery.
SQL> select * from v$recover_file;
FILE# ONLINE ONLINE_ ERROR CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- ---------
1 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
2 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
3 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
4 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
5 ONLINE ONLINE UNKNOWN ERROR 2062569 17-MAR-16
Execute the recover database command using controlfile. it will prompt for redolog files.
provide complete path of the redo log files and observer the output of results.
SQL> recover database until cancel using backup controlfile;
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u02/app/oracle/oradata/db11g/redo01.log
ORA-00328: archived log ends at change 2053116, need later change 2061969
ORA-00334: archived log: '/u02/app/oracle/oradata/db11g/redo01.log'
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
Alter applying one redo log file. i tried to open the database with resetlogs. but still error message, datafile was not restored from sufficient backp.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u02/app/oracle/oradata/db11g/system01.dbf'
Execute the recover database command again and enter the second redo log file.
SQL> recover database until cancel using backup controlfile;
ORA-00279: change 2061969 generated at 03/17/2016 21:31:59 needed for thread 1
ORA-00289: suggestion : /u02/app/oracle/fast_recovery_area/DB11G/archivelog/2016_03_18/o1_mf_1_65_%u_.arc
ORA-00280: change 2061969 for thread 1 is in sequence #65
This time i seen the message Media recovery complete.
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
/u02/app/oracle/oradata/db11g/redo02.log
Log applied.
Media recovery complete.
Then open the Database with resetlogs.
SQL> alter database open resetlogs;
Database altered.
Verify the status of the Database.
SQL> select status from v$instance;
STATUS
------------
OPEN
Database is recovered with redolog files.
Cheers!!!
No comments:
Post a Comment