ORA-00392ORA-00312日志正在清除故障
最近在还原Oracle数据库后open的时候碰到了ORA-00392:log3ofthread1isbeingcleared,operationnotallowed,其字面含义则是日志文件正在被清除,不允许操作。
通常情况下,当我们基于不完全恢复的时候,日志文件需要被清空,而此时是正在被清空。不是很好理解啊。下面是这个问题的解决方案。
一、故障现象
<codeclass="hljsvhdl">SQL>alterdatabaseopenresetlogs; alterdatabaseopenresetlogs * ERRORatline1: ORA-00392:log3ofthread1isbeingcleared,operationnotallowed ORA-00312:onlinelog3thread1:'/oradata/sincnet/redo03.log' --查看故障描述信息 SQL>hooerrora00392 00392,00000,"log%softhread%sisbeingcleared,operationnotallowed" //*Cause:Anoperationencounteredthisonlineloginthemiddleofbeing //cleared.Thecommandthatbegantheclearingmayhaveterminated //withoutcompletingtheclearing. //*Action:Iftheclearcommandisstillexecutingthenwaitforits //completion.Ifitterminatedthenreissuetheclearcommand,or //dropthelog. --下面的SQL语句表名3个日志文件都处于clearing状态 SQL>selectgroup#,bytes/1024/1024||'M',statusfromv$log; GROUP#BYTES/1024/1024||'M'STATUS ------------------------------------------------------------------- 150MCLEARING 350MCLEARING_CURRENT 250MCLEARING</code>
二、故障处理
<codeclass="hljsvhdl"><codeclass="hljsvhdl">下面直接执行clearlogfile命令 SQL>ALTERDATABASECLEARLOGFILEGROUP1; Databasealtered. SQL>ALTERDATABASECLEARLOGFILEGROUP2; Databasealtered. SQL>ALTERDATABASECLEARLOGFILEGROUP3; Databasealtered. --再次查看状态,此时状态显示为常见的几种正常状态 SQL>selectgroup#,bytes/1024/1024||'M',statusfromv$log; GROUP#BYTES/1024/1024||'M'STATUS ------------------------------------------------------------------- 150MUNUSED 350MCURRENT 250MUNUSED --再次尝试openresetlog,依旧错误,实例终止,需要upgrade SQL>alterdatabaseopenresetlogs; alterdatabaseopenresetlogs * ERRORatline1: ORA-01092:ORACLEinstanceterminated.Disconnectionforced ORA-00704:bootstrapprocessfailure ORA-39700:databasemustbeopenedwithUPGRADEoption ProcessID:30553 SessionID:1217Serialnumber:3 --查看是否存在pmon进程 SQL>hops-ef|greppmon oracle3058930440016:02pts/100:00:00/bin/bash-cps-ef|greppmon oracle3059130589016:02pts/100:00:00greppmon --Author:Leshami --Blog:http://blog.csdn.net/leshami --下面尝试upgrade,因为当前基于一个11.2.0.1的备份恢复到11.2.0.4,所以需要upgrade SQL>startupupgrade; ORA-24324:servicehandlenotinitialized ORA-01041:internalerror.hostdefextensiondoesn'texist SQL> SQL>exit DisconnectedfromOracleDatabase11gEnterpriseEditionRelease11.2.0.4.0-64bitProduction WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions [oracle@10134569DBSRV]$sqlplus/assysdba SQL*Plus:Release11.2.0.4.0ProductiononWedFeb2416:03:152016 Copyright(c)1982,2013,Oracle.Allrightsreserved. Connectedtoanidleinstance. SQL>startupupgrade; ORACLEinstancestarted. TotalSystemGlobalArea1068937216bytes FixedSize2260088bytes VariableSize704643976bytes DatabaseBuffers352321536bytes RedoBuffers9711616bytes Databasemounted. Databaseopened. SQL>@$ORACLE_HOME/rdbms/admin/catupgrd.sql;--执行升级脚本</code></code>
关于ORA-00392ORA-00312日志正在清除故障的教程小编就给大家介绍这么多,希望对大家有所帮助!