Oracle database keeps record of changes made to data. Every time user performs a DML, DDL or DCL operation, its redo entries are also created. These redo entries contain commands to rebuild or redo the changes. These entries are stored in Redo Log buffer. Log writer process (LGWR) writes these redo entries to redo log files. Redo log buffer works in circular fashion. It means that it overwrites old entries. But before overwriting, old entries must be copies to redo log files. Usually Log writer process (LGWR) is fast enough to mange these issues. Log writer process (LGWR) writes redo entries after certain amount of time to ensure that free space is available for new redo entries. LGWR process writes
- When user performs commit
- After every three seconds
- When redo log buffer is 1/3 full.
- When DBWn process writes data to disk and redo entries of these data hasn’t been written yet.
When DBWn writes modified data from Database buffer cache to disk, corresponding redo entries must also be written to disk. In fact redo entries are written prior to writing actual entries. DBWn process checks for redo entries, it signal LGWR process if redo entries have not been written.
If database is running in archiving mode then archive log files are created from redo log files. These archive log files are used to in various database recovery techniques.
initialization parameter is used to set the size Redo Log buffer.