Oracle Database Instance - Oracle 实例篇 3

来源:互联网 发布:八大山人 知乎 编辑:程序博客网 时间:2024/05/22 00:35

前言:接上一篇Oracle Database Instance - Oracle实例篇2

Oracle Database Instance - Oracle 实例篇http://blog.csdn.net/nature_ann/article/details/9850391

1. Checkpoints

<<-----检查点的一个重要机制就是保证数据库的一致性。关键字:检查点位置,Redo Stream,控制文件,数据文件头,修改数据库库缓冲区----->>

A checkpoint is a crucial mechanism inconsistent database shutdowns, instance recovery, and Oracle Database operation generally. The termcheckpoint has the following related meanings:

>>A data structure that indicates thecheckpoint position, which is theSCN in the redo stream where instance recovery must begin

The checkpoint position is determined by theoldest dirty buffer in the database buffer cache. The checkpoint position acts as apointer to the redo stream and is stored in the control file and in each data file header.

>>The writing of modified database buffers in the database buffer cache todisk

 

1.1   Purpose of Checkpoints

<<---1.减少恢复请求的时间,如果发生实例或介质故障。2.保证高效缓冲区里面的脏数据定期的被写入磁盘。3.在数据库正常关闭的情况下,保证所有的提交的数据写入磁盘。--->>

Oracle Database uses checkpoints to achieve the following goals:

>>Reduce the time required for recovery in case of an instance or media failure

>>Ensure that dirty buffers in the buffer cache are written todisk regularly

>>Ensure that all committed data is written todisk during a consistent shutdown

1.2  When oracle database initiates checkpoints

<<---CKPT进程负责检查点写入数据文件头和控制文件。检查点类型:线程检查点,表空间和数据文件检查点。增量检查点,其他类型的检查点>>

The checkpoint process (CKPT)is responsible for writing checkpoints to the data file headers and control file. Checkpoints occur in a variety of situations. For example, Oracle Database uses the following types of checkpoints:

>>Thread checkpoints

The database writes to disk all buffers modifiedby redo in a specific threadbefore a certain target. The set of thread checkpoints on all instances in a database is adatabase checkpoint.Thread checkpoints occur in the following situations:

@Consistent database shutdown                       --数据库一致性状态下正常关闭

@Alter system checkpoint statement                   --修改Alter system checkpoint 命令

@Online redo log switch                                      --切换在线重做日志

@Alter database begin backup statement           --修改数据库开始备份命令

>>Tablespace and data file checkpoints

--触发表空间和数据文件检查点条件:表空间只读,表空间离线,收缩数据文件,执行表空间开始备份命令。

The database writes to disk all buffers modified by redo before a specific target. Atablespace checkpoint is a set of data file checkpoints, one for each data file in the tablespace. These checkpoints occur in a variety of situations, including making a tablespace read-onlyor taking it offline normal,shrinking a data file, or executing Alter tablespace begin backup.  

>>Incremental checkpoints

<<--增量检查点是线程检查点类型的一种。DBWn至少三秒做检查—CKPT写检查点到控制文件不写数据文件头--->>

An incremental checkpoint is a type ofthread checkpoint partly intended to avoid writing large numbers of blocks at online redo log switches.DBWn checks at leastevery three seconds to determine whether it has work to do. WhenDBWn writes dirty buffers, it advances the checkpoint position, causingCKPT to write the checkpoint position to the control file, but not to the data file headers.

>>Other types of checkpoints

--其他的检查点:实例和介质恢复检查点,模式对象被droptruncate时检查点

include instance and media recovery checkpoints and checkpoints when schema objects are dropped or truncated.

 

 

待续。。。