In the Oracle documentation, it is said that :
"Rolling forward proceeds through as many redo log files as necessary to bring the database forward in time. Rolling forward usually includes online redo log
files and may include archived redo log files."
also, it is said that :
"NOARCHIVELOG mode protects a database only from instance failure, not from disk (media) failure. Only the most recent changes made to the database,
stored in the groups of the online redo log, are available for instance recovery. "
So, when Oracle does a switch log, db files are updated and only the current redo log file
is needed in case of an instance recovery ? I am right ? If I am wrong, in which case Oracle
needs current log file & unactive log files to perform an instance recovery (DB in no archive mode) ?
Thanks a lot
You are correct, in instance recovery oracle only needs to roll forward the changes from the current logfile. The changes from unactive logfiles are allready recorded in the database files.
Thanks for your reply.
So, If the online redo log file are not in unactive mode, Oracle needs to roll forward active
and current redo files. So, if you have 3 redo files, 2 actives & 1 current, you will use all online redo log file for an instance recovery ... Am I right ?
I must admit I do not exactly know when the online redo log gets a status "ACTIVE", but I suppose it is during the time of when the redo log file is full, but the checkpoint is not complete yet, so the log switch has not occured yet. Anyway I suppose there never can be more than one redo log group that has status "CURRENT" or "ACTIVE". This also implies that the instance recovery never have to roll forward the changes from more than *one* redo log file.
So my direct answer to your follow-up question: I don't think you can have one redo log file with status CURRENT and two others with status ACTIVE. I think one of them has to have either status ACTIVE or CURRENT, all the others have status INACTIVE and are not needed for instance recovery.
But as I said, this are only my speculations, so feel free to correct me if I'm wrong.
Possible Status values for redo log files:
(From Oracle Backup and Recovery Guide)
The online redo log has never been written to.
This is the current redo log and that it is active. The redo log can be open or closed.
The log is active, that is, needed for instance recovery, but is not the current log.It may be in use for block recovery, and may or may not be archived.
The log is being recreated as an empty log after an ALTER DATABASE CLEAR LOGFILE command. After the log is cleared, the status changes to UNUSED.
The current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
The log is no longer needed for instance recovery. It may be in use for media recovery, and may or may not be archived