I found the following sentence from Oracle documentation.

If archiving is disabled (the database is in NOARCHIVELOG mode), then when the last redo log file is full, LGWR continues by overwriting the first available active file.

My question is, active log file must be used when Oracle doing instance recovery, so if active log files are overwritten, this will cause some problem if you encountered an instance failure now. If so, why LGWR writes to the first active (instead of inactive) log files?



You probably misunderstood the documentation. Online Logfiles are used in a cyclic fashion, regardless whether you are in archivelog mode or not. The difference is that LGWR may have to wait until the next (in line) online log is being archived before it is allowed to write into it.

Never will LGWR overwrite an Online Logfile that is still in status ACTIVE - exactly because else an Instance Recovery would be impossible. It has to wait at least until the checkpoint, associated to that ACTIVE log is completed and it becomes INACTIVE.

Look here (again?) for a more detailed explanation: http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/onlineredo001.htm

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.