Sunday 14 May 2017

ORA-00313 | Getting Missing Logfile Error on Oracle Database Startup

ORA-00313 | Getting Logfile Error on Oracle Database Startup

This was the unexpected error that I faced while starting up my database running on one of my office servers and I was shocked to find out why I got this error.

ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: 'J:\DATABASE\TEXDEC13\REDO011.LOG'
ORA-00312: online log 1 thread 1: 'J:\DATABASE\TEXDEC13\REDO021.LOG'
ORA-00312: online log 1 thread 1: 'J:\DATABASE\TEXDEC13\REDO031.LOG'

Immediately, I checked my alert.log and it was cofirmed that my database was unable to find the Redolog files and hence displayed this error. I looked for the physical existence of the files but as expected, they were also missing from the drive location. 
               The one thing I didn't get was how these redologs got removed on their own as nobody in my team does that. It's still a mystery to me and I am looking forward for the deep explanation for why this happened but let's just leave it for later.

Solution:

To overcome the above mentioned situation, I simply shutdown the database using command

SQL> shutdown immediate

then startup the database in MOUNT mode

SQL> Startup mount

Then using the below mentioned command to recreate the logfiles

SQL> recover database until cancel;
Database recovery complete.

Finally open the database using resetlogs.

SQL> alter database open resetlogs;

At this point, your new redologs have been automically created and you'll be able to open the database in READ-WRITE mode. 

No comments:

Post a Comment