Monday, May 12, 2008

ORA-01547,ORA-01194,ORA-01589 During Recovery

Error Description:

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;
ORA-00279: change 969547 generated at 05/12/2008 23:54:02 needed for thread 1
ORA-00289: suggestion :
/oradata2/flash_recovery_area/DBASE/archivelog/2008_05_12/o1_mf_1_4_%u_.arc
ORA-00280: change 969547 for thread 1 is in sequence #4



Specify log: {=suggested | filename | AUTO | CANCEL}
AUTO
ORA-00308: cannot open archived log
'/oradata2/flash_recovery_area/DBASE/archivelog/2008_05_12/o1_mf_1_4_%u_.arc'
ORA-27037: unable to obtain file status
Solaris-AMD64 Error: 2: No such file or directory
Additional information: 3


ORA-00308: cannot open archived log
'/oradata2/flash_recovery_area/DBASE/archivelog/2008_05_12/o1_mf_1_4_%u_.arc'
ORA-27037: unable to obtain file status
Solaris-AMD64 Error: 2: No such file or directory
Additional information: 3


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: '/oradata2/data1/dbase/system01.dbf'


Solution of The Problem:
A)Find the datafile(s) which is in FUZZY mode.

SQL> select file#,STATUS, FUZZY from v$datafile_header;

FILE# STATUS FUZ
---------- ------- ---
1 ONLINE YES
2 ONLINE YES
3 ONLINE YES
4 ONLINE YES
5 ONLINE YES
6 ONLINE YES
7 ONLINE YES
8 OFFLINE NO
9 OFFLINE NO

9 rows selected.

So many files need more recovery.
The best solution at this point is to apply more archivelogs in order to get offending datafile/s out of FUZZY mode.

In many cases the recovery session may be requesting an archivelog which has not been generated. The reason for this is because the recovery clause included "using backup controlfile"

If this is the case you need to apply the current online redo log to complete the recovery then

B)Find out the current redo log.


SQL> select member from v$logfile lf , v$log l where l.status='CURRENT' and lf.group#=l.group#;
MEMBER
--------------------------------------------------------------------------------
/oradata2/data1/dbase/redo02.log

C)Now apply this redo log to the database.


SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL;

ORA-00279: change 969547 generated at 05/12/2008 23:54:02 needed for thread 1
ORA-00289: suggestion :
/oradata2/flash_recovery_area/DBASE/archivelog/2008_05_12/o1_mf_1_4_%u_.arc
ORA-00280: change 969547 for thread 1 is in sequence #4


Specify log: {=suggested | filename | AUTO | CANCEL}
/oradata2/data1/dbase/redo02.log
Log applied.
Media recovery complete.

D)Open the database with RESETLOGS option.

SQL> ALTER DATABASE OPEN RESETLOGS;
Database altered.

No comments:

Post a Comment