Oracle 报错:ORA-00313、ORA-00312、ORA-27047 解决方法

 Oracle 报错:ORA-00313、ORA-00312、ORA-27047 解决方法

启动数据库

SQL> startup
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size            2252824 bytes
Variable Size          805310440 bytes
Database Buffers      436207616 bytes
Redo Buffers            8892416 bytes
Database mounted.
ORA-03113: end-of-file on communication channel
Process ID: 40669
Session ID: 125 Serial number: 5
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

查看alert日志

[oracle@vastdata1 ~]$ vi /u01/app/oracle/diag/rdbms/prod/PROD/trace/alert_PROD.log
...... 
Errors in file /u01/app/oracle/diag/rdbms/prod/PROD/trace/PROD_lgwr_40796.trc:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/PROD/redo02.log'
ORA-27047: unable to read the header block of file
Linux-x86_64 Error: 25: Inappropriate ioctl for device
......
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

解决方法如下:

SQL> conn / as sysdba
Connected to an idle instance.
  • 1
  • 2
  • 1
  • 2
SQL> startup mount
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size            2252824 bytes
Variable Size          805310440 bytes
Database Buffers      436207616 bytes
Redo Buffers            8892416 bytes
Database mounted.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

清理损坏的日志

SQL> alter database clear logfile group 2;

Database altered.
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

删除损坏的日志

SQL> alter database drop logfile group 2;

Database altered.
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

现在可以正常打开数据库

SQL> alter database open;

Database altered.
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

添加日志

SQL> alter database add logfile group 2 ('/u01/app/oracle/oradata/PROD/redo02.log') size 50M;

Database altered.
  • 1
  • 2
  • 3
  • 1
  • 2
  • 3

总结: 
对于非current redo log损坏,如果是处于inactive状态的redo,那么处理起来很简单,直接clear然后drop掉,不会有数据的丢失。


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值