以下摘自Oracle 概念。也许这是一个愚蠢的问题,但我真的需要你的帮助来理解它。
我的问题是:
- 上下文线程检查点中的线程是什么意思?
- 这是否意味着重做日志线程(属于特定实例的所有重做日志文件)?
- 某个目标是什么意思?
谢谢大家!英语不是我的母语,我觉得有点难以完全理解这一点。
When Oracle Database Initiates Checkpoints
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 modified by redo in a specific thread before
^^^^^^^^^^^^^^^^^^^^
a certain target. The set of thread checkpoints on all instances in a database is
^^^^^^^^^^^^^^^^^
a database checkpoint. Thread checkpoints occur in the following situations:
– Consistent database shutdown
– ALTER SYSTEM CHECKPOINT statement
– 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. A
tablespace 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-only or taking it offline normal, shrinking a data file, or executing
ALTER TABLESPACE BEGIN BACKUP.
■ Incremental checkpoints
An incremental checkpoint is a type of thread checkpoint partly intended to avoid
writing large numbers of blocks at online redo log switches. DBWn checks at least
every three seconds to determine whether it has work to do. When DBWn writes
dirty buffers, it advances the checkpoint position, causing CKPT to write the
checkpoint position to the control file, but not to the data file headers.
Other types of checkpoints include instance and media recovery checkpoints and
checkpoints when schema objects are dropped or truncated.
是的,这种情况下的线程是实例生成的重做。如果您有一个 4 节点 RAC,您将有 4 个重做线程。这是
thread#
在v$archived_log
. 确定的目标几乎肯定是指一个 SCN。我不完全确定,但我相信“线程检查点”中的“线程”是指 DBWR 线程/进程。
引用的“特定目标”是可配置的;几个 init.ora 参数会影响它,包括:
如果我没记错的话,Oracle 概念书的“线程”是指重做线程,而“通过在特定线程中重做”是指写入磁盘的缓冲区是由事务生成的缓冲区,这是生成这些的原因由这个特定的重做线程命名的重做记录。我希望我没有让它听起来更混乱!;)
我认为“某些目标”将是书中在“线程检查点”解释下方命名的语句,例如
ALTER SYSTEM CHECKPOINT
。检查点参数和三秒间隔将触发“增量检查点”,因为所有这些都旨在加快检查点过程。