一、前言:
在进行数据库的异机不完全恢复的时候,打开数据库需要进行resetlogs的操作,但是有时候在进行resetlog的时候经常会报ORA-00344的错误;
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00392: log 5 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 5 thread 1: '/oracle/PIP/mirrlogA/log_g15m1.dbf'
ORA-00312: online log 5 thread 1: '/oracle/PIP/mirrlogA/log_g15m2.dbf'
二、解决方法:
1、先查找数据库的online redo log的情况;
SQL> select group#,bytes/1024/1024||'M',status from v$log;
GROUP# BYTES/1024/1024||'M' STATUS
---------- ----------------------------------------- ----------------
5 500M CLEARING_CURRENT
8 500M CLEARING
7 500M CLEARING
6 500M CLEARING
2、运行相应的clear log的操作
SQL> alter database clear logfile group 5;
Database altered.
SQL> alter database clear logfile group 6;
Database altered.
SQL> alter database clear logfile group 7;
Database altered.
SQL> alter database clear logfile group 8;
Database altered.
SQL> alter database open resetlogs;
Database altered.
显示当前数据库已经被打开了;
--------------------------------------------------------------------------------------------------
IT技术员的理想发展曲线:技术员——技术管理——运营管理——企业战略
个人理念:不做单纯的技术,技术就做管理的技术
ORACLE技术管理QQ群:367875324
-------------------------------------------------------------------------------------------------