Showing posts with label Background Processes. Show all posts
Showing posts with label Background Processes. Show all posts

Friday, December 26, 2008

When Does LGWR Write?

Log Writer writes from redo log buffer to the redo log files when one of the following occurs:
  • Every 3 seconds
  • A user commits a transaction
  • A redo Log Buffer is one-third full
  • Redo Log Buffer contains 1 MB worth of redo information
  • Before DBWn process whenever a database checkpoint occurs

When Does DBWR Write?

Database Writer (DBWR) writes from the database buffer cache to the data files when one of the following occurs:
  • No free buffer space in the cache
  • Number of modified and committed, but unwritten, buffers in the cache is too large
  • At a database checkpoint event
  • The instance shutdown (other than shutdown abort)
  • A tablespace in backup mode or offline mode or read only mode
  • A segment is dropped

Sunday, December 21, 2008

About Checkpoints

A checkpoint is an event that flushes the modified data from buffer cache to the disk and updates the control file and datafiles. The CKPT process updates the headers of datafiles and control files. A checkpoint is initiated automatically when one of the following occurs:

1) When the redo log file is filled and a log switch occurs
2) When the instance is shutdown with NORMAL, TRANSACTIONAL, or IMMEDIATE
3) When a tablespace status is changed to read-only or put into BACKUP mode

Commands for issuing Checkpoint manually:
--------------------------------------------
ALTER SYSTEM CHECKPOINT;

ALTER SYSTEM SWITCH LOGFILE;