首页 > Linux操作系统 > Linux操作系统 > LGWR & CKTP & Log Swtich

LGWR & CKTP & Log Swtich

原创 Linux操作系统 作者:tolywang 时间:2006-04-20 00:00:00 0 删除 编辑
Redo Log Buffer and the LGWR Background Process

The oracle server sequentially records all changes made to the database in the redo log buffer.The redo log buffer is used in a circular manner.The redo entries are written to one of the online redo log groups called the current online redo log group by the LGWR process under the following situations:

1. When a transaction commits
2. When the redo log buffer becomes one-third full
3. When there is more than a megabyte of changed records in the redo log buffer.
4. When timeout occurs(every 3 seconds)
5. Before the DBWn writes modified blocks in the database buffer cache to the data files.

Log Switches

LGWR writes to the online redo log files sequentially - that is , when the current online redo log group is filled , LGWR begins writing to the next group ,when the last available online redo log file is filled, LGWR returns to the first online redo log group and starts writing again .

The database administrator can also force log switches.Each time a log switch occurs and LGWR begins writing to a new log group, the oracle server assigns a number known as the log sequence number to identify the set of redo entries.

When a log switch occurs, and event called a checkpoint is initiated.

A log switch is the event during which LGWR stops writing to one online redo log group and starts writing to another.

During a checkpoints:

1. A number of dirty database buffers covered by the log being checkpointed are written to the data files by DBWn . The number of buffers being written by DBWn is determined by the parameter FAST_START_IO_TARGET , if specifed.

2.The checkpoint background process CKPT updates the headers of all data files and control files to reflect that it has completed successfully.

Checkpoints can occur for all data files in the database or for only specific data files.

A checkpoint occurs , for example, in the following situations:

1.At every log switch
2.when an instance has been shut down with the normal ,transactional,or immediate option
3.When forced by setting the initialization parameters: LOG_CHECKPOINT_INTERVAL,LOG_CHECKPOINT_TIMEOUT,and FAST_START_IO_TARGET
4.When manually requested by the database administrator

Information about each checkpoint is recorded in the ALERT file if the initialization parameter LOG_CHECKPOINT_TO_ALERT is set to TURE. The default value of FALSE for this parameter does not log checkpoint.

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

上一篇: JOB工作小结
请登录后发表评论 登录
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。


  • 博文量
  • 访问量