LGWR,Log Switches, and Checkpoints
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-84450/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 1453D - Checkpoints3D
- 12C開始oracle實現了SCALABLE LGWR多程式並行寫redo logOracle並行
- CF1993C Light Switches 題解
- Codeforces Round #688(Div 2) D. Checkpoints
- Oracle 的Lgwr Worker的工作原理Oracle
- LGWR (ospid: 29534): terminating the instance due to error 4021Error
- LGWR寫操作會導致效能全域性卡頓案例分析
- undo log和redo log
- 【Mysql】三大日誌 redo log、bin log、undo logMySql
- MySQL error log和bin logMySqlError
- exclude Log4j print Log
- MySQL的Redo log 以及Bin logMySql
- MySQL中的redo log和undo logMySql
- MySQL Undo Log和Redo Log介紹MySql
- log 工具
- git logGit
- 以Lgwr Worker為例,基於Strace 分析 Oracle 資料庫行為的方法Oracle資料庫
- ORA-01623: log is current log for thread - cannot dropthread
- MySQL的general_log和slow_logMySql
- trick整理:序列二分log^2轉log
- 配置LOG4J(log4j-1.2.17)
- LGWR和ARCH下密碼檔案不一致對FAL的影響密碼
- Tomcat 中 catalina.out、catalina.log、localhost.log 和 access_log 的區別Tomcatlocalhost
- log工具類
- Log日誌
- MySQL Binary LogMySql
- 14.5.4 Log Buffer
- log file switch
- git log 退出Git
- Mysql系統變數中 log_error_services | log_filter_internal; log_sink_internal 和 log_error_verbosity | 2 解釋MySql變數ErrorFilter
- c# Log 日誌 以及不列印重複LogC#
- 使用Log4Net根據log level的不同將log輸出到不同的檔案中
- ssserver -c /etc/shadowsocks.json --log-file /var/log/shadowsocks.log -d start啟動失敗ServerJSON
- 硬核乾貨!一文掌握 binlog 、redo log、undo log
- MySQL中redo log、undo log、binlog關係以及區別MySql
- mysql日誌:redo log、binlog、undo log 區別與作用MySql
- 深入理解MySQL系列之redo log、undo log和binlogMySql
- log4net
- systrace抓取log命令