If archiving is disabled and the last redo log file is full, why LGWR continues by overwriting the first available active file, not inactive file?

dba.stackexchange https://dba.stackexchange.com/questions/5935

  •  16-10-2019
  •  | 
  •  

Question

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?

Thanks.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top