Open resetlogs startup reports ORA-00392 ORA-00312 Error
Error message:
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: '/orabase/bak/oradata/orcl/redo03.log'
Official explanation:
CLEARING_CURRENT-Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
CLEARING-Log is being re-created as an empty log after an ALTER DATABASE CLEAR
Centralized status of redo log files: * (abstract )*
1. CURRENT-the group currently being used by LGWR (ACTIVE at the same time), which records the changes being made in the database. Deleting the group will cause data loss during recovery.
2. ACTIVE-ACTIVE Log File status. logs may be in this status after switching or waiting for checkpoint events. logs that are not in the CURRENT status are required when the instance is restored, at this time, the log may have been archived and will soon become INACTIVE, or the log file is not archived while waiting for the Checkpoint event.
3. INACTIVE-INACTIVE log status. At this time, the log instance is no longer needed and may have been archived.
4. UNUSED-blank log group that has not yet recorded change, usually appears in add logfile. resetlogs opens the database or uses the clear logfile command.
5. CLEARING-indicates that the redo log files of this group are being reconstructed by the alter database clear logfile statement (the status will change to unused after reconstruction ).
6. CLEARING_CURRENT-indicates that an error occurs when the group retries the log file reconstruction. This status occurs when an I/O fault occurs to the log file.
Solution:
SQL> select group #, bytes/1024/1024 | 'M', status from v $ log;
GROUP # BYTES/1024/1024 | 'M' STATUS
-------------------------------------------------------------------
1 40 M CLEARING
3 40 M CLEARING_CURRENT
2 40 M CLEARING
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> alter database open resetlogs;
Database altered.
SQL> select * from v $ logfile;
GROUP # status type member is _
-----------------------------------------------
3 ONLINE/orabase/bak/oradata NO
/Orcl/redo03.log
2 ONLINE/orabase/bak/oradata NO
/Orcl/redo02.log
1 ONLINE/orabase/bak/oradata NO
/Orcl/redo01.log
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian