What Is A Redo log Buffer?

MynotesoracleDBA
Nerd For Tech
Published in
3 min readMar 17, 2022

Here we are going to understand about the redo log buffer in oracle architecture.

What is a redo log ?

  • When we make any change on the table data by an insert, update delete, create, alter, drop operations.
  • When we make any change on the table data by an insert, update delete, create, alter, drop operations.
  • It is very important to capture the database consistency to maintain the changes.
Source: Oracle

Why We used redo log?

  • If somehow you need to recover the database or a table to a previous state, you can use the redo log data for this recovery.
  • The DBA can perform these recovery processes, but as a programmer is not eligible to perform it.
  • These redo log entries have been stored in the redo log buffer in the SGA.
  • A redo log buffer is a memory area that stores these entries for some time.

SCN:

  • When we done the commit or when the buffer gets full, the log writer process gives a system change number to these redo log entries, and write them to the redo log files in the redo log discs.
  • It does not wait for all the buffer, to be filled to write it.
  • It writes when the buffer is one-third full.
  • The log writer process does not wait for these things to happen.
  • It runs every 3 seconds and writes these to the disc.

Circular Buffer:

  • This memory area is finite. Since that, it is been created as a circular buffer.
  • It means when it is full. The server starts writing to it starting from the beginning. Since this is a circular action, they call this kind of buffers circular buffers.
  • But sometimes, the redo log is filled before you commit all the changes. The change is saved to the redo log files by the log writer process and if you rollback, they are deleted from there.
  • After the commit or memory limit exceeds, they are stored into the redo log files in the disc.
  • So whenever you need to recover the database or a table to its previous state, or a period, it can easily be done by using the redo log files.

Conclusion:

  • The recovery is done when something unexpected happens like a system crash or something like that.
  • As of now do not think that rollback is done with the redo log files.
  • It is done in some other ways, But the importance of the redo logs for each change in the database will create a redo log entry and this will have a cost on the database.

--

--

MynotesoracleDBA
Nerd For Tech

As a DBA we are going to write and discuss multiple database administration concepts. “Nothing Grows In Comfort Zone”.