ORA-00392 ORA-00312 在线日志状态是clearing

129 篇文章 7 订阅

问题描述

在还原Oracle数据库后open的时候,尝试开库。
出现报错:
ORA-00392: 日志 17 (用于线程 1) 正被清除, 不允许操作
其字面含义则是日志文件正在被清除,不允许操作。通常情况下,当我们基于不完全恢复的时候,日志文件需要被清空,而此时是正在被清空。不是很好理解

解决方法

SQL> select group#,status from v$log;

    GROUP# STATUS
---------- ----------------
    17 CLEARING_CURRENT
    33 UNUSED
    19 CLEARING_CURRENT
    18 CLEARING

SQL> alter database open resetlogs;
alter database open resetlogs
*
第 1 行出现错误:
ORA-00392: 日志 17 (用于线程 1) 正被清除, 不允许操作 ORA-00312:
联机日志 17 线程 1: '/u01/app/oracle/oradata/racdb/onlinelog/group17.log'
ORA-00312: 联机日志 17 线程 1: '/u01/app/oracle/oradata/racdb/onlinelog/redo177.log'
ORA-00312: 联机日志 17 线程 1: '/u01/app/oracle/oradata/racdb/onlinelog/redo17.log'

SQL> ho oerr ora 00392
00392, 00000, "log %s of thread %s is being cleared, operation not allowed"
// *Cause:  An operation encountered this online log in the middle of being
//          cleared.  The command that began the clearing may have terminated
//          without completing the clearing.
// *Action: If the clear command is still executing then wait for its
//          completion. If it terminated then reissue the clear command, or
//          drop the log.
SQL> alter database clear logfile group 18;

数据库已更改。

SQL> alter database clear logfile group 17;

数据库已更改。

SQL> alter database clear logfile group 19;

数据库已更改。

SQL> select group#,bytes/1024/1024 'M',status from v$log;

GROUP#     M                          STATUS
---------- -------------------- ----------------
    17         300M                      CURRENT
    33         100M                      UNUSED
    19         300M                      CURRENT
    18         300M                      UNUSED

SQL> alter database open resetlogs;

数据库已更改。

SQL> select status from v$instance;

STATUS
------------
OPEN
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值