RelationalDBDesign RelationalDBDesign


Backup Options   «Prev  Next»
Lesson 6Recreating Redo Log Files
ObjectiveDescribe the Steps to recreate Inactive Redo Logs

Recreating Redo Log Files

The ALTER DATABASE CLEAR LOGFILE command drops and recreates the corrupt online redo file, but you can also perform this process manually. It's a helpful procedure to know if the ALTER DATABASE CLEAR LOGFILE command fails and reusing the currently configured log file name to recreate the log file becomes impossible.
The following SlideShow demonstrates how to perform an inactive redo log recovery. You may also preview all the steps.


  1. Since the database cannot be opened before the damaged online redo log is recreated, the DBA starts the database in the mount mode.
  2. The DBA queries the data dictionary view V$LOGFILE to find the location to create the damaged redo log file(3).
  3. Since there are more than two online redo logs, the DBA drops the corrupted online redo log (5)


Recreating Online Redo Log - File

The command lines and their results for the whole process are displayed below.

SVRMGR> STARTUP OPEN PFILE='C:\ORANT\DATABASE\INITORCL.ORA'
ORACLE instance started.
Total System Global Area                         11710464 bytes
Fixed Size                                          49152 bytes
Variable Size                                    11177984 bytes
Database Buffers                                   409600 bytes
Redo Buffers                                        73728 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: 'C:\ORANT\DATABASE\LOG2ORCL.ORA'
SVRMGR> SELECT * FROM V$LOGFILE; 
GROUP#     STATUS  MEMBER
------     ------- ----------------------------------------------
     1             C:\ORANT\DATABASE\LOG4ORCL.ORA
     2      STALE  C:\ORANT\DATABASE\LOG3ORCL.ORA
     3      STALE  C:\ORANT\DATABASE\LOG2ORCL.ORA
     4             C:\ORANT\DATABASE\LOG1ORCL.ORA
4 rows selected.
SVRMGR> ALTER DATABASE DROP LOGFILE GROUP 3;
Statement processed.
SVRMGR> ALTER DATABASE ADD LOGFILE GROUP 3 'C:\ORANT\DATABASE\LOG2ORCL.ORA' SIZE 150k;
Statement processed.
SVRMGR> ALTER DATABASE OPEN;
Statement processed.
SVRMGR>

The next lesson demonstrates how to obtain recovery status information through the data dictionary views.