Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 8i logfile problem

Re: Oracle 8i logfile problem

From: Sybrand Bakker <>
Date: Fri, 05 Aug 2005 22:45:28 +0200
Message-ID: <>

On Fri, 05 Aug 2005 19:23:56 GMT, BCC <> wrote:

>We have oracle 8i running on a sun machine. Our DBA just left and of
>course the database died. Somehow I was elected to try and fix it, but
>Im a software engineer, I know very very very little about oracle.
>When I run the startup script, I get the following:
>Oracle8i Enterprise Edition Release - Production
>With the Partitioning option
>JServer Release - Production
>SVRMGR> Connected.
>SVRMGR> ORACLE instance started.
>Total System Global Area 959467680 bytes
>Fixed Size 73888 bytes
>Variable Size 138080256 bytes
>Database Buffers 819200000 bytes
>Redo Buffers 2113536 bytes
>Database mounted.
>ORA-00341: log 4 of thread 1, wrong log # 1 in header
>ORA-00312: online log 4 thread 1: '/opt/oracle/oradata/lims/redoG04M01.log'
>Server Manager complete.
>Database "lims" warm started.
>But whenever I (or anyone else) tries to connect it says the database is
>initializing or shutting down.
>I tried recovering, which fails becuase of the ORA-00341/312 error. I
>dont know how to reset the logs, or even if I did what the ramifications
>of this are. I dont even know what GUI tools exist to help with
>database maintenance, or how to run them.
>Can anyone help out?


ORA-00341 log string of thread string, wrong log # string in header

Cause: The internal information in an online log file does not match the control file.

Action: Restore the correct file or reset the logs. Refer to the Oracle8i Administrator's Guide for recovery procedures.

If you have the correct online redolog, restore the redolog. The second message tells which file is in error. However, it looks like you need to open the database with resetlogs. Doing so, will invalidate the current online redologs and you may potentially loose data.
You'll need the following commands (in a ksh prompt)

export ORACLE_SID=<yoursid>
sqlplus '/ as sysdba'
(in the sqlplus prompt)
startup mount;
alter database open resetlogs;

If I were you I would
shutdown immediate

and take a backup of this database. At least you know *this* situation is consistent.

Sybrand Bakker, Senior Oracle DBA
Received on Fri Aug 05 2005 - 15:45:28 CDT

Original text of this message