ORACLE_FileManage_Redo logfile recover
1). No-current and active status about the redo was destroyed
The issue:
The redo log was dropped, now mounted, but can’topen and show warning:
ORA-00313:open failed for members of log group 3 of thread 1
ORA-00312: online log 3thread 1: '/oracle10/oradata/ora10g/redo03.log'
The solution:
SQL>selectgroup#,thread#,sequence#, archived,status from v$log;
GROUP# THREAD# SEQUENCE# ARCHIVED STATUS
------ ------- ---------- -------- --------
1 1 103 YES INACTIVE
2 1 104 NO CURRENT
3 1 102 YES INACTIVE
If thisredo logfinished the archive, we can to do this:
SQL> Alter database clear logfile group 3;
If still didn’tarchive, we have to do this:
SQL> Alter database clear unarchived logfile group 3;
And then try to open:
SQL> Alter database open;
Suggest to do the full backup ASAP.
2). currentor active status about the redo was destroyed
The issue:
ORA-00313:open failed for members of log group 2 of thread 1
ORA-00312: online log 2thread 1: '/oracle10/oradata/ora10g/redo02.log'
The solution:
SQL>selectgroup#,thread#,sequence#, archived,status from v$log;
GROUP# THREAD# SEQUENCE# ARCHIVED STATUS
------ ------- ---------- -------- --------
1 1 2 YES INACTIVE
2 1 4 NO CURRENT
3 1 3 YES INACTIVE
Scene 1: This redostill here, just belong to the logic corrupted, and didn’t any events need torecover
SQL> alter database clear unarchived logfile group 2; <====== Not any warning.
SQL> recover database until cancel;
SQL> alter database open resetlogs;
Scene 2: The redo wasdestroyed, and need to recover. But there are some history backup and thearchivelog files.
SQL> alter database clear unarchived logfilegroup 2; <=== Will get some warning
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery ofthread 1
-- restore database;
SQL> recover database until cancel; <==== Choose “auto”
SQL> alter database open resetlogs;
Need to finish a full backup ASAP.
Scene 2: The redo wasdestroyed, and need to recover, no any history backup
SQL> shutdown immediate;
And add the following in the pfile:
*._allow_resetlogs_corruption=true #<===== Suggest to backup the datafile, this database can't rollback after add some unpublished parameters.
SQL> startup mount pfile=‘xxx’;
SQL> recover database until cancel;
SQL>alter database open resetlogs;
SQL> shutdown immediate;
SQL>Startup;
Need to rebuild this database after exp theapplication data.