Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Redolog Buffer Cache : SGA Component of Oracle

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarAshiwini
  • 02 Jul, 2024
  • 0 Comments
  • 2 Mins Read

Redolog Buffer Cache : SGA Component of Oracle

  • The redo log buffer is a circular buffer in the SGA that stores redo entries describing changes made to the database. Redo entries contain the information necessary to reconstruct, or redo, changes made to the database by DML or DDL operations. Database recovery applies redo entries to data files to reconstruct lost changes.
  • Oracle Database processes copy redo entries from the user memory space to the redo log buffer in the SGA. The redo entries take up continuous, sequential space in the buffer. The background process log writer (LGWR) writes the redo log buffer to the active online redo log group on disk.

  • The Log Writer (LGWR) process is a crucial background process in Oracle Database that manages the writing of redo entries from the redo log buffer to the online redo log files on disk. This process ensures that all changes made to the database are recorded in a way that can be recovered in the event of a failure.
  • LGWR is responsible for writing the contents of the redo log buffer to the online redo log files. This operation ensures that all committed transactions are safely stored on disk
  • By writing redo entries to disk in batches, LGWR optimizes I/O operations and ensures that the system’s performance remains high. The continuous, sequential nature of the redo log buffer allows for efficient disk writes.
  • As transactions modify data, redo entries are generated and stored in the redo log buffer. These entries describe the changes made by the transactions. The redo log buffer is managed as a circular buffer. When the buffer is full or reaches a specific threshold, LGWR initiates the writing process to free up space for new entries. LGWR writes the redo entries from the redo log buffer to the current online redo log file. This process is crucial for maintaining data integrity and supporting database recovery operations.
The database has three redo latches to handle this process:
  • Redo Allocation Latch:This latch is used to serialize the allocation of space within the redo log buffer. When a transaction generates redo entries, it must allocate space in the redo log buffer. The redo allocation latch ensures that this allocation process is done without conflicts.
  • Redo Copy Latch:The redo allocation latch is acquired to allocate memory space in the log buffer. Before Oracle9.2, the redo allocation latch is unique and thus serializes the writing of entries to the log buffer cache of the SGA. In Oracle 9.2. Enterprise Edition, the number of redo allocation latches is determined by init.ora LOG_PARALLELISM. The redo allocation latch allocates space in the log buffer cache for each transaction entry. If transactions are small, or if there is only one CPU on the server, then the redo allocation latch also copies the transaction data into the log buffer cache. If a log switch is needed to get free space this latch is released as well with the redo copy latch.
  • Redo Writing Latch:This latch is used by the Log Writer (LGWR) process when it writes the contents of the redo log buffer to the online redo log files on disk. The redo writing latch ensures that the write operation is serialized to maintain data consistency and integrity.