本文主要是介绍ORA-00392 ORA-00312 在线日志状态是clearing,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题描述
在还原Oracle数据库后open的时候,尝试开库。
出现报错:
ORA-00392: 日志 17 (用于线程 1) 正被清除, 不允许操作
其字面含义则是日志文件正在被清除,不允许操作。通常情况下,当我们基于不完全恢复的时候,日志文件需要被清空,而此时是正在被清空。不是很好理解
解决方法
SQL> select group#,status from v$log;GROUP# STATUS
---------- ----------------17 CLEARING_CURRENT33 UNUSED19 CLEARING_CURRENT18 CLEARINGSQL> 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 CURRENT33 100M UNUSED19 300M CURRENT18 300M UNUSEDSQL> alter database open resetlogs;数据库已更改。SQL> select status from v$instance;STATUS
------------
OPEN
这篇关于ORA-00392 ORA-00312 在线日志状态是clearing的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!