ORA-00392ORA-00312日志正在清除故障
程序员文章站
2024-01-16 21:32:58
最近在还原oracle数据库后open的时候碰到了ora-00392: log 3 of thread 1 is being cleared, operation not...
最近在还原oracle数据库后open的时候碰到了ora-00392: log 3 of thread 1 is being cleared, operation not allowed,其字面含义则是日志文件正在被清除,不允许操作。
通常情况下,当我们基于不完全恢复的时候,日志文件需要被清空,而此时是正在被清空。不是很好理解啊。下面是这个问题的解决方案。
一、故障现象
<code class="hljs vhdl">sql> alter database open resetlogs; alter database open resetlogs * error at line 1: ora-00392: log 3 of thread 1 is being cleared, operation not allowed ora-00312: online log 3 thread 1: '/oradata/sincnet/redo03.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语句表名3个日志文件都处于clearing状态 sql> select group#,bytes/1024/1024||'m',status from v$log; group# bytes/1024/1024||'m' status ---------- ----------------------------------------- ---------------- 1 50m clearing 3 50m clearing_current 2 50m clearing</code>
二、故障处理
<code class="hljs vhdl"><code class="hljs vhdl">下面直接执行clear logfile 命令 sql> alter database clear logfile group 1; database altered. sql> alter database clear logfile group 2; database altered. sql> alter database clear logfile group 3; database altered. --再次查看状态,此时状态显示为常见的几种正常状态 sql> select group#,bytes/1024/1024||'m',status from v$log; group# bytes/1024/1024||'m' status ---------- ----------------------------------------- ---------------- 1 50m unused 3 50m current 2 50m unused --再次尝试open resetlog,依旧错误,实例终止,需要upgrade sql> alter database open resetlogs; alter database open resetlogs * error at line 1: ora-01092: oracle instance terminated. disconnection forced ora-00704: bootstrap process failure ora-39700: database must be opened with upgrade option process id: 30553 session id: 1217 serial number: 3 --查看是否存在pmon进程 sql> ho ps -ef|grep pmon oracle 30589 30440 0 16:02 pts/1 00:00:00 /bin/bash -c ps -ef|grep pmon oracle 30591 30589 0 16:02 pts/1 00:00:00 grep pmon --author : leshami --blog : http://blog.csdn.net/leshami --下面尝试upgrade,因为当前基于一个11.2.0.1的备份恢复到11.2.0.4,所以需要upgrade sql> startup upgrade; ora-24324: service handle not initialized ora-01041: internal error. hostdef extension doesn't exist sql> sql> exit disconnected from oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production with the partitioning, olap, data mining and real application testing options [oracle@10134569 dbsrv]$ sqlplus / as sysdba sql*plus: release 11.2.0.4.0 production on wed feb 24 16:03:15 2016 copyright (c) 1982, 2013, oracle. all rights reserved. connected to an idle instance. sql> startup upgrade; oracle instance started. total system global area 1068937216 bytes fixed size 2260088 bytes variable size 704643976 bytes database buffers 352321536 bytes redo buffers 9711616 bytes database mounted. database opened. sql> @$oracle_home/rdbms/admin/catupgrd.sql; --执行升级脚本</code></code>
关于ora-00392ora-00312日志正在清除故障的教程小编就给大家介绍这么多,希望对大家有所帮助!
上一篇: 浅谈vuex 闲置状态重置方案
下一篇: 用ajax动态加载需要的js文件