当数据库打开时若某一个redo log重做日志文件存在日志损坏/坏块corruption,则可能出现以下错误:
如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!
诗檀软件专业数据库修复团队
服务热线 : 13764045638 QQ号:47079569 邮箱:service@parnassusdata.com
ORA-16038 log %s sequence# %s cannot be archived ORA-354 corrupt redo log block header ORA-353 log corruption near block change time ORA-367 checksum error in log file header [oracle@mlab2 ~]$ oerr ora 16038 16038, 00000, "log %s sequence# %s cannot be archived" // *Cause: An attempt was made to archive the named file, but the // file could not be archived. Examine the secondary error // messages to determine the cause of the error. // *Action: No action is required. [oracle@mlab2 ~]$ oerr ora 354 00354, 00000, "corrupt redo log block header" // *Cause: The block header on the redo block indicated by the accompanying // error, is not reasonable. // *Action: Do recovery with a good version of the log or do time based // recovery up to the indicated time. If this happens when archiving, // archiving of the problem log can be skipped by clearing the log // with the UNARCHIVED option. This must be followed by a backup of // every datafile to insure recoverability of the database. [oracle@mlab2 ~]$ oerr ora 353 00353, 00000, "log corruption near block %s change %s time %s" // *Cause: Some type of redo log corruption has been discovered. This error // describes the location of the corruption. Accompanying errors // describe the type of corruption. // *Action: Do recovery with a good version of the log or do incomplete // recovery up to the indicated change or time. www.askmac.cn [oracle@mlab2 ~]$ oerr ora 367 00367, 00000, "checksum error in log file header" // *Cause: The file header for the redo log contains a checksum that does // not match the value calculated from the file header as read from // disk. This means the file header is corrupted // *Action: Find the correct file and try again.
对于不同状态的在线日志文件online redo logfile 损坏/坏块,有不同的解决方案。
对于以下2种情况将不能drop online的redo logfile,他们是:
- 如果仅仅有2个redo logfile groups
- 损坏的redo logfile文件属于当前日志组 current logfile group; V$LOG.STATUS=CURRENT
解决方案大致如下:
可以通过clear 命令来清理有问题的日志文件,语法如下:
alter database clear <unarchived> logfile group <integer>;
alter database clear <unarchived> logfile ‘<filename>’;
例如:
alter database clear logfile group 1;
alter database clear unarchived logfile group 1;
对于status=current 或者 status=active的日志将无法被清理, 如果清理会报 ORA-01624:
SQL> alter database clear unarchived logfile group 5; alter database clear unarchived logfile group 5 * ERROR at line 1: ORA-01624: log 5 needed for crash recovery of instance G10R25 (thread 1) ORA-00312: online log 5 thread 1: '/s01/G10R25/onlinelog/o1_mf_5_954q1vdo_.log' www.askmac.cn [oracle@vrh8 ~]$ oerr ora 1624 01624, 00000, "log %s needed for crash recovery of instance %s (thread %s)" // *Cause: A log cannot be dropped or cleared until the thread's checkpoint // has advanced out of the log. // *Action: If the database is not open, then open it. Crash recovery will // advance the checkpoint. If the database is open force a global // checkpoint. If the log is corrupted so that the database cannot // be opened, it may be necessary to do incomplete recovery until // cancel at this log.
对于status=active的日志较为简单,只要能顺利完成一个alter system checkpoint就可以将其状态改为INACTIVE之后再CLEAR。
对于status=current的online redo logfile则比较麻烦,一般需要动用隐藏参数”_ALLOW_RESETLOGS_CORRUPTION”