Saturday 23 April 2016

Redo-log 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 .
At that time v$log view showing status "CURRENT"

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

4. CLEARING
Whenever any log file is corrupted or missing ( which is not "active" or not "current") then we use statement  - -"alter database clear logfile"
to recreate corrupted log file.
At  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".

No comments:

Post a Comment