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

本文介绍了遇到Oracle数据库日志错误ORA-00327的情况,其中包含乱码问题。日志显示数据库日志文件状态异常,一个为INVALID,另一个为stale,但系统仍能正常运行。针对这个问题,需要进行数据库结构完整性的检查。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

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

[oracle@dtydb5 scripts]$ oerr ora 327
00327, 00000, "log %s of thread %s, physical size %s less than needed %s"
// *Cause:  A log file has shrunk in size. This is likely
//          to have been caused by operator or operating system error.
// *Action: Restore the log file from backup.  If backup is not available,
//          drop this log and re-create.  If the database was shut down
//          cleanly, no further action should be required; otherwise
//          incomplete recovery may be required.

[oracle@dtydb5 scripts]$ oerr ora 312
00312, 00000, "online log %s thread %s: '%s'"
// *Cause:  This message reports the filename for details of another message.
// *Action: Other messages will accompany this message. See the
//          associated messages for the appropriate action to take.

[oracle@dtydb5 scripts]$ oerr ora 321
00321, 00000, "log %s of thread %s, cannot update log file header"
// *Cause:  Cannot write to the log file.
// *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,系统还在正常运行中.

        31          3        575          2        536,870,912 YES ACTIVE

        32          3        576          2        536,870,912 NO  CURRENT

    GROUP# STATUS  TYPE    MEMBER                                             IS_
---------- ------- ------- -------------------------------------------------- ---
        31 STALE   ONLINE  +DATA/tyolap/onlinelog/redo31a                     NO
                   ONLINE  +DATA/tyolap/onlinelog/redo31b                     NO

        32 INVALID ONLINE  +DATA/tyolap/onlinelog/redo32a                     NO
                   ONLINE  +DATA/tyolap/onlinelog/redo32b                     NO

STATUS 	VARCHAR2(7) 	Status of the log member:

    INVALID - File is inaccessible

    STALE - File's contents are incomplete

    DELETED - File is no longer used

    null - File is in use

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

sys@TYOLAP3(dtydb5)> ALTER DATABASE DROP LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a'; 

数据库已更改。


sys@TYOLAP3(dtydb5)> ALTER DATABASE ADD LOGFILE MEMBER '+DATA/tyolap/onlinelog/redo31a' to group 31;   

数据库已更改。

sys@TYOLAP3(dtydb5)> alter system switch logfile;

系统日志恢复正常

    GROUP# STATUS  TYPE    MEMBER                                             IS_
---------- ------- ------- -------------------------------------------------- ---
        31         ONLINE  +DATA/tyolap/onlinelog/redo31a                     NO
                   ONLINE  +DATA/tyolap/onlinelog/redo31b                     NO

        32         ONLINE  +DATA/tyolap/onlinelog/redo32a                     NO
                   ONLINE  +DATA/tyolap/onlinelog/redo32b                     NO

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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值