Search This Blog

Sunday, December 30, 2007

redolog file status

Redo log file is very crucial for database recovery...
and most of time we confuse about "status" of v$log file for redo log files.


1. UNUSED
Whenever you create any redo log file ...that time v$log view showing status "UNUSED"

2. CURRENT
After Creation when redo log "lgwr" process use that file ....that time v$log view showing status "CURRENT"

3. ACTIVE
If database running in archivelog mode then after log switch "arch" process use log file and create archivelog file that time v$Log file view showing status "ACTIVE"

4. CLEARING
Whenever any log file is corrupted or missing ( which is not "active" or not "current") then we use "alter database clear logfile" statement to recreate corrupted log file ... that time v$log view showing status "CLEARING" after clearing it is showing "UNUSED"

5. INACTIVE
During archivelog file creation v$log view showing status "ACTIVE" and when archivelog file is created then it is showing "INACTIVE" for particular one redo log file at a time.


6. CLEARING_CURRENT
If any error occured during "alter database clear logfile" then v$log file view showing "CLEARING_CURRENT".

3 comments:

Jithesh said...

Mr Taj,

there is a mistake in ur blog. when an online redo group shows the status 'Active', it simply means it contains the latest checkpoint, and not that it is used by ARCn

Mohammed Taj said...

Dear Jithesh,

Yes, your right, but it is also possible when redolog show 'ACTIVE' arc process use redolog for archive purpose. but basically it is for CRASH RECOVERY.

ACTIVE status show CRASH RECOVERY.

check more:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:69959697198021

Documentation Say:
ACTIVE - Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It may or may not be archived.

Regards,
Taj

Sunil said...

hi nice blog !!!