Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

2

主题
1#
发表于 2015-5-13 11:40:11 | 查看: 3778| 回复: 11
datafile HEADER的 checkpoint SCN 什么时候进行更新呢?增量检查点控制文件 中的 DATABASE 部分 Database checkpoint 每3秒都会不断更新,并且应该是和LOW RBA 同一位置的,控制文件中的DATAFILE HEADER 中的SCN 应该也会同事更新吧。 我想问问 DATAFILE  HEADER中 SCN 什么时候更新 好像有LAZY 写入的概念吧

Checkpoint SCN: Updated on every checkpoint, but not when in Hot backup state
(not online backups). This must remain untouched when you are in hot backup mode,
because you might get checkpoints between the BEGIN BACKUP and when you
actually start the copying process.

Tablespace #0 - SYSTEM  rel_fn:1
Creation   at   scn: 0x0000.00000008 10/22/2005 21:44:31
Backup taken at scn: 0x0000.00126b8a 08/01/2013 17:16:03 thread:1
reset logs count:0x3159bdd8 scn: 0x0000.001d599f reset logs terminal rcv data:0x0 scn: 0x0000.00000000
prev reset logs count:0x3159b91e scn: 0x0000.001d494d prev reset logs terminal rcv data:0x0 scn: 0x0000.00000000
recovered at 03/09/2015 14:06:19
status:0x2004 root dba:0x00400179 chkpt cnt: 664 ctl cnt:663
begin-hot-backup file size: 72960
Checkpointed at scn:  0x0000.009b215c 03/09/2015 20:00:41

就是这里的CHECKPOINT

还有 这个问题 Block SCN is ahead of Current SCN 由于后台进程或服务进程都会比对UGA中的dependent SCN和数据库当前的SCN,如果数据库当前SCN小于dependent SCN   就是ora 600 2662 错误的时候 这个CURRENT SCN 来自于哪里(controlfile header)?BLOCK SCN 倒好理解一点,我知道BLOCK SCN来自于 BLOCK的CACHE LAYER。

当然我也是刚开始学习内部,许多描述也许不太贴切。做ORACLE 8年了一直没敢去研究这块,现在研究一下
2#
发表于 2015-5-13 22:48:56
可以 转化为下面的问题

哪些检查点会更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

3#
发表于 2015-5-13 22:49:38
FULL checkpoint

Writes block images to the database for all dirty buffers from all instances
Statistics updated:
DBWR checkpoints
DBWR checkpoint buffers written
DBWR thread checkpoint buffers written
Caused by:       
Alter system checkpoint [global]
Alter database begin backup
Alter database close
Shutdown
Controlfile and datafile headers are updated
CHECKPOINT_CHANGE#



full checkpoint完全检查点会更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

4#
发表于 2015-5-13 22:50:11
Thread Checkpoint

Writes block images to the database for all dirty buffers from one instance
Statistics updated:
DBWR checkpoints
DBWR checkpoint buffers written
DBWR thread checkpoint buffers written
Caused by:       
Alter system checkpoint local
Controlfile and datafile headers are updated
CHECKPOINT_CHANGE#

Thread Checkpoint 线程检查点会更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

5#
发表于 2015-5-13 22:50:42
File Checkpoint

Writes block images to the database for all dirty buffers for all files of a tablespace from all instances
Statistics updated:
DBWR tablespace checkpoint buffers written
DBWR checkpoint buffers written
DBWR checkpoints
Caused by:       
Alter tablespace XXX offline
Alter tablespace XXX begin backup
Alter tablespace XXX read only
Controlfile and datafile headers are updated
CHECKPOINT_CHANGE#

File Checkpoint 文件检查点会更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

6#
发表于 2015-5-13 22:51:13
Parallel Query Checkpoint

Writes block images to the database for all dirty buffers belonging to objects accessed by the query from all instances
Statistics updated:
DBWR checkpoint buffers written
DBWR checkpoints
Caused by:       
Parallel Query
Parallel Query component of PDML or PDDL
Mandatory for consistency


Parallel query checkpoint 并行查询检查点不更新  datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

7#
发表于 2015-5-13 22:51:38
Object “Checkpoint”

Writes block images to the database for all dirty buffers belonging to an object from all instances
Statistics updated:
DBWR object drop buffers written
DBWR checkpoints
Caused by:       
Drop table XXX
Drop table XXX purge
Truncate table XXX
Mandatory for media recovery purposes

object 级别checkpoint 不更新  datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

8#
发表于 2015-5-13 22:52:32
Incremental Checkpoint

Writes the contents of “some” dirty buffers to the database from CKPT-Q  
Block images written in SCN order
Checkpoint RBA updated in SGA
Statistics updated:
DBWR checkpoint buffers written
Controlfile is updated every 3 seconds by CKPT
Checkpoint progress record


增量检查点 不更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

9#
发表于 2015-5-13 22:53:12
Log Switch Checkpoint

Writes the contents of “some” dirty buffers to the database
Statistics updated:
DBWR checkpoints
DBWR checkpoint buffers written
background checkpoints started
background checkpoints completed
Controlfile and datafile headers are updated
CHECKPOINT_CHANGE#


日志切换检查点 Log Switch Checkpoint 更新 datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

10#
发表于 2015-5-13 22:54:21
如上


FULL checkpoint 、Thread Checkpoint、File Checkpoint、
Log Switch Checkpoint 四种checkpoint 会更新  datafile header CHECKPOINT_CHANGE#



Parallel Query Checkpoint、
Object “Checkpoint”、
Incremental Checkpoint 三种checkpoint 不会更新  datafile header CHECKPOINT_CHANGE#

回复 只看该作者 道具 举报

11#
发表于 2015-5-14 10:39:54
谢谢 您的回答,但是如此,那么 DATAFILE HEADER的SCN 那不是长期得不到更新?一旦异常掉电 出现问题的可能性 很大?只有依靠滚动 LOGFILE进行更新了哦?

另外一个问题
还有 这个问题 Block SCN is ahead of Current SCN 由于后台进程或服务进程都会比对UGA中的dependent SCN和数据库当前的SCN,如果数据库当前SCN小于dependent SCN   就是ora 600 2662 错误的时候 这个CURRENT SCN 来自于哪里(controlfile header)?BLOCK SCN 倒好理解一点,我知道BLOCK SCN来自于 BLOCK的CACHE LAYER。
请刘大 看看。这个问题对于理解2662错误非常重要 。

回复 只看该作者 道具 举报

12#
发表于 2015-5-14 10:43:22
以后有什么问题 我会经常 到你这里发帖 谢谢您

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-20 20:03 , Processed in 0.121966 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569