你好,游客 登录 注册 搜索
背景:
阅读新闻

logfile文件损坏的问题处理(ORA-00327)

[日期:2012-11-14] 来源:Linux社区  作者:hijk139 [字体:大 中 小]

1, 数据库日志报错ORA-00327,注意此处有乱码

  1. Errors in file /Oracle/app/oracle/diag/rdbms/tyolap/tyolap3/trace/tyolap3_lgwr_22388.trc:
  2. ORA-00327: 脠脮脮I 31 (脌M戮<80> 3 碌脛): <8c><8d>贸w麓贸脨隆 102400 脡脵矛露脣霉脨猫脪陋碌脛 1048576
  3. ORA-00312: 戮<80>脡脧脠脮脮I 31 脌M戮<80> 3: '+DATA/tyolap/onlinelog/redo31a'
  4. Errors in file /oracle/app/oracle/diag/rdbms/tyolap/tyolap3/trace/tyolap3_lgwr_22388.trc:
  5. ORA-00321: 脠脮脮I 31 (脌M戮<80> 3 碌脛): <9f>o路篓赂眉脨脗脠脮脮I<99>n<98>脣卯^
  6. ORA-00312: 戮<80>脡脧脠脮脮I 31 脌M戮<80> 3: '+DATA/tyolap/onlinelog/redo31a'

查看报错具体内容,应该是redo文件+DATA/tyolap/onlinelog/redo31a损坏

  1. [oracle@dtydb5 scripts]$ oerr ora 327
  2. 00327, 00000, "log %s of thread %s, physical size %s less than needed %s"
  3. // *Cause: A log file has shrunk insize. This is likely
  4. // to have been caused by operator or operating system error.
  5. // *Action: Restore the log file from backup. If backup isnot available,
  6. // drop this log and re-create. If the database was shut down
  7. // cleanly, no further action should be required; otherwise
  8. // incomplete recovery may be required.
  9. [oracle@dtydb5 scripts]$ oerr ora 312
  10. 00312, 00000, "online log %s thread %s: '%s'"
  11. // *Cause: This message reports the filename for details of another message.
  12. // *Action: Other messages will accompany this message. See the
  13. // associated messages for the appropriate actionto take.
  14. [oracle@dtydb5 scripts]$ oerr ora 321
  15. 00321, 00000, "log %s of thread %s, cannot update log file header"
  16. // *Cause: Cannot write to the log file.
  17. // *Action: Restore the access to the file.

2,进一步查看trc文件,具体原因没看明白,但基本已可以确定是日志文件损坏

DE: Problem Key 'ORA 313' was flood controlled (0x1) (no incident)
ORA-00313: ?????? 31 (???? 3) ?????
ORA-00313: ?????? 31 (???? 3) ?????
DDE rules only execution for: ORA 312
----- START Event Driven Actions Dump ----
---- END Event Driven Actions Dump ----
----- START DDE Actions Dump -----
Executing SYNC actions
----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
DDE Action 'DB_STRUCTURE_INTEGRITY_CHECK' was flood controlled
----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (FLOOD CONTROLLED, 5 csec) -----
Executing ASYNC actions
----- END DDE Actions Dump (total 0 csec) -----

3,查看此redo文件的状态,status为INVALID,另一个为stale,系统还在正常运行中.

  1. 31 3 575 2 536,870,912 YES ACTIVE
  2. 32 3 576 2 536,870,912 NOCURRENT
  3. GROUP# STATUS TYPE MEMBER IS_
  4. ---------- ------- ------- -------------------------------------------------- ---
  5. 31 STALE ONLINE +DATA/tyolap/onlinelog/redo31a NO
  6. ONLINE +DATA/tyolap/onlinelog/redo31b NO
  7. 32 INVALID ONLINE +DATA/tyolap/onlinelog/redo32a NO
  8. ONLINE +DATA/tyolap/onlinelog/redo32b NO
  9. STATUS VARCHAR2(7) Status of the log member:
  10. INVALID - File is inaccessible
  11. STALE - File's contents are incomplete
  12. DELETED - File isno longer used
  13. null - File isin use

4,日志文件损坏,最简单的方法就是在线重建日志文件了

  1. sys@TYOLAP3(dtydb5)> ALTERDATABASEDROP LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a';
  2. 数据库已更改。
  3. sys@TYOLAP3(dtydb5)> ALTERDATABASEADD LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a'togroup 31;
  4. 数据库已更改。
  5. sys@TYOLAP3(dtydb5)> alter system switch logfile;
  6. 系统日志恢复正常
  7. GROUP# STATUS TYPE MEMBER IS_
  8. ---------- ------- ------- -------------------------------------------------- ---
  9. 31 ONLINE +DATA/tyolap/onlinelog/redo31a NO
  10. ONLINE +DATA/tyolap/onlinelog/redo31b NO
  11. 32 ONLINE +DATA/tyolap/onlinelog/redo32a NO
  12. ONLINE +DATA/tyolap/onlinelog/redo32b NO

5,系统恢复正常了,但是日志文件损坏的原因还不是特清楚。

linux
相关资讯       Oracle错误代码  ORA-00327 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款