LGWR & CKTP & Log Swtich

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博客 ” ,链接:http://blog.itpub.net/35489/viewspace-84365/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-84365/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值