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

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

[sql]  view plain copy
  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损坏

[sql]  view plain copy
  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 in size. This is likely  
  4. //          to have been caused by operator or operating system error.  
  5. // *Action: Restore the log file from backup.  If backup is not 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.   
  10. [oracle@dtydb5 scripts]$ oerr ora 312  
  11. 00312, 00000, "online log %s thread %s: '%s'"  
  12. // *Cause:  This message reports the filename for details of another message.  
  13. // *Action: Other messages will accompany this message. See the  
  14. //          associated messages for the appropriate action to take.  
  15.   
  16. [oracle@dtydb5 scripts]$ oerr ora 321  
  17. 00321, 00000, "log %s of thread %s, cannot update log file header"  
  18. // *Cause:  Cannot write to the log file.  
  19. // *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,系统还在正常运行中.

[sql]  view plain copy
  1.         31          3        575          2        536,870,912 YES ACTIVE  
  2.   
  3.         32          3        576          2        536,870,912 NO  CURRENT  
  4.   
  5.     GROUP# STATUS  TYPE    MEMBER                                             IS_  
  6. ---------- ------- ------- -------------------------------------------------- ---  
  7.         31 STALE   ONLINE  +DATA/tyolap/onlinelog/redo31a                     NO  
  8.                    ONLINE  +DATA/tyolap/onlinelog/redo31b                     NO  
  9.   
  10.         32 INVALID ONLINE  +DATA/tyolap/onlinelog/redo32a                     NO  
  11.                    ONLINE  +DATA/tyolap/onlinelog/redo32b                     NO  
  12.   
  13. STATUS  VARCHAR2(7)     Status of the log member:  
  14.   
  15.     INVALID - File is inaccessible  
  16.   
  17.     STALE - File's contents are incomplete  
  18.   
  19.     DELETED - File is no longer used  
  20.   
  21.     null - File is in use  

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

[sql]  view plain copy
  1. sys@TYOLAP3(dtydb5)> ALTER DATABASE DROP LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a';   
  2.   
  3. 数据库已更改。  
  4.   
  5.   
  6. sys@TYOLAP3(dtydb5)> ALTER DATABASE ADD LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a' to group 31;     
  7.   
  8. 数据库已更改。  
  9.   
  10. sys@TYOLAP3(dtydb5)> alter system switch logfile;  
  11.   
  12. 系统日志恢复正常  
  13.   
  14.     GROUP# STATUS  TYPE    MEMBER                                             IS_  
  15. ---------- ------- ------- -------------------------------------------------- ---  
  16.         31         ONLINE  +DATA/tyolap/onlinelog/redo31a                     NO  
  17.                    ONLINE  +DATA/tyolap/onlinelog/redo31b                     NO  
  18.   
  19.         32         ONLINE  +DATA/tyolap/onlinelog/redo32a                     NO  
  20.                    ONLINE  +DATA/tyolap/onlinelog/redo32b                     NO  

5,系统恢复正常了,但是日志文件损坏的原因还不是特清楚。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值