楼主: songyuee

[精华] 关于checkpoint

[复制链接]
论坛徽章:
0
21#
 楼主| 发表于 2003-2-25 10:21 | 只看该作者
获教颇多
多谢大家了

使用道具 举报

回复
论坛徽章:
16
ITPUB元老
日期:2005-04-27 08:46:182013年新春福章
日期:2013-02-25 14:51:242012新春纪念徽章
日期:2012-01-04 11:49:54鲜花蛋
日期:2011-12-27 22:39:17ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412010新春纪念徽章
日期:2010-03-01 11:20:51生肖徽章2007版:牛
日期:2009-07-13 12:53:13生肖徽章2007版:蛇
日期:2009-03-19 13:57:24生肖徽章2007版:牛
日期:2008-12-17 10:30:43奥运会纪念徽章:足球
日期:2008-10-24 13:28:14
22#
发表于 2003-2-25 10:28 | 只看该作者
最初由 tiantianoracle 发布
[B]log switch 过程(日志A 切换到日志B),不允许重做生成。这个过程很短。
一旦切换完毕,日志B标志为可用,重做继续生成,可以写到log buffer 或日志B中。

checkpoint 是另外一个事件了。 [/B]


那假如说在日志A log witch到日志B,而这时日志B里所对应的在
data buffer里的dirty data block(称这些block为Y)还没有写入datafile。
发生checkpoint,按我的理解,该checkpoint的目的是为了把Y写入
datafile,并把checkpoint的序列号更新control file,data file和redo log file。所以日志文件B要可用,应该是等到checkpoint结束。否则,
如果日志文件B不等checkpoint结束就可用,那在checkpoint的过程
中假设日志B被很多redo entry所填充,而这时checkpoint未结束,发
生断电,data buffer被清空。重新open database时,那些未被
checkpoint进datafile里的数据在日志B里已经找不到对应的记录了,
这时oracle还能保证commit所提交的数据不丢失吗?

另外对biti所说的‘commit跟 checkpoint 没有直接关系,只跟写日志有关系 log switch 也跟 checkpoint没有直接关系 ’。我的意思就是
指commit要写日志文件B,而这时由于checkpoint未结束,日志B不
可用。所以该commit应该等,一直到日志B可用,才写入日志B,
同时返回客户端commit结束。

我的愚见,请各位高手指教。

使用道具 举报

回复
论坛徽章:
16
ITPUB元老
日期:2005-04-27 08:46:182013年新春福章
日期:2013-02-25 14:51:242012新春纪念徽章
日期:2012-01-04 11:49:54鲜花蛋
日期:2011-12-27 22:39:17ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412010新春纪念徽章
日期:2010-03-01 11:20:51生肖徽章2007版:牛
日期:2009-07-13 12:53:13生肖徽章2007版:蛇
日期:2009-03-19 13:57:24生肖徽章2007版:牛
日期:2008-12-17 10:30:43奥运会纪念徽章:足球
日期:2008-10-24 13:28:14
23#
发表于 2003-2-25 10:36 | 只看该作者
最初由 hooman 发布
[B]

在这种情况下, 是30分钟后, LOG FILE A 才可用. 如果在30分钟之内, LOG switch 到A了, 数据库就会HUNG住, ALTER LOG 中就会看到CHECK POINT NOT COMLETE [/B]


刚写完就发现了hooman兄的说法。看来我上一帖的写法错误。
如果确实如你所说,当日志A log switch 到日志B时,是将日志A
内容checkpoint到data file里的话,就解决了我的疑惑了。

非常感谢。

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
24#
发表于 2003-2-25 10:39 | 只看该作者
"commit要写日志文件B,而这时由于checkpoint未结束,日志B不
可用"

biti讲得对。
日志切换完日志文件B就可用了,可以从buffer中写入重做记录,与checkpoint 完不完成没有关系。
你还是看一下相关资料吧。

使用道具 举报

回复
论坛徽章:
2
ITPUB元老
日期:2005-03-02 12:45:52授权会员
日期:2005-10-30 17:05:33
25#
发表于 2003-2-25 17:04 | 只看该作者
最初由 hanson 发布
[B]

刚写完就发现了hooman兄的说法。看来我上一帖的写法错误。
如果确实如你所说,当日志A log switch 到日志B时,是将日志A
内容checkpoint到data file里的话,就解决了我的疑惑了。

非常感谢。 [/B]


嚯嚯, 互相讨论.

使用道具 举报

回复
论坛徽章:
3
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
26#
发表于 2003-2-25 20:36 | 只看该作者
你用 select * from v$sysstat where name like '%check%';
看一看                                                 class   value
     137 background checkpoints started                                            8        321
       138 background checkpoints completed                                          8        321
中的value是否相同
还有当日志切换时产生检测点,checkpoint要完成很多事情,当下一个日志需要切换时,检测点还没有完成,这说明日志文件小。

使用道具 举报

回复
论坛徽章:
0
27#
发表于 2003-3-28 14:22 | 只看该作者

一点看法

A log switch is
the event during which LGWR stops writing to one online redo log group and starts writing
to another. The two events are often connected: an instance takes a checkpoint at each
log switch by default. A log switch, by default, takes place automatically when the current
online redo log file group fills.
每有一个checkpioint触发,则会把这个checkpioint和上一个checkpioint点间dirty cache中的
数据写到datafile中,而log swith 一个会触发checkpioint,所以在没有把此checkpioint点和上
一个checkpioint点的数据写完到datafile 前,下一个redo log B 是不可用(CHECK POINT NOT COMLETE)
这是我的一点看法。

使用道具 举报

回复
论坛徽章:
3
祖国60周年纪念徽章
日期:2009-10-09 08:28:002010新春纪念徽章
日期:2010-03-01 11:04:582012新春纪念徽章
日期:2012-01-04 11:49:54
28#
发表于 2003-3-28 17:36 | 只看该作者
看法和 liuguanyun 相同   
出现 Checkpoint not complete  相应也会有  
Thread 1 cannot allocate new log, sequence 249 等

意思是 This message indicates that Oracle wants to reuse a redo log file, but the
corresponding checkpoint associated is not terminated.  In this case, Oracle
must wait until the checkpoint is completely realized.  (metalink 147468.1)

Log switich 的时候会 有相应的checkpoint ,
而不是 "log switch 也跟 checkpoint没有直接关系 " ,"日志切换完日志文件B就可用了,可以从buffer中写入重做记录,与checkpoint 完不完成没有关系 "

产生错误信息的原因则是

- A frequency of checkpoints which is too high.  /*checkopint 过于频繁
- A checkpoints are starting but not completing   /*checkpoint  没完成
- A DBWR which writes too slowly.                    /* DBWR写入过慢 ,LGWR 不得不等待DBWR 完成

特别注意的地方是当日志切换的时候 ,日志产生的 checkpoint
会不考虑当前的 checkpoint process

A checkpoint occurs at every log switch.  If a previous checkpoint is already
in progress, the checkpoint forced by the log switch will override the current
checkpoint.

使用道具 举报

回复
论坛徽章:
0
29#
发表于 2003-4-11 13:14 | 只看该作者

同意9IAS ~~

//agree

可以吧CKPT启起来

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
30#
发表于 2005-3-31 19:49 | 只看该作者
意犹未尽.
顶上去.继续......

那位xd来解析一下tom下面的这段话?
the infamous "checkpoint not complete, cannot allocate new log" message.

this occurrs when Oracle attempts to reuse a log file but the checkpoint that would flush the blocks that may have redo in this log file has not yet completed
-- we must wait until that checkpoint completes before we can reuse that file -- thats when this message is printed.  during this time (when we cannot allocate a new log) processing is suspended in the database while the checkpoint is made to complete ASAP.

使用道具 举报

回复

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

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表