+ -
当前位置:首页 → 问答吧 → 哪位大侠给解析一下,阈值存储过程为什么会跳过低阈值直接执行高阈值了?

哪位大侠给解析一下,阈值存储过程为什么会跳过低阈值直接执行高阈值了?

时间:2010-11-19

来源:互联网

我在一个数据库上定义了若干阈值存储过程,如下:

1> sp_helpthreshold     
2> go
segment name   free pages   last chance?   threshold procedure      
-------------- ------------ -------------- -------------------------
logsegment           768000              0 sp_thresholdaction_second                 日志空间使用空间大于40%时激活
logsegment           512000              0 sp_thresholdaction_second                 日志空间使用空间大于60%时激活
logsegment           256000              0 sp_thresholdaction                        日志空间使用空间大于80%时激活
logsegment            21624              1 sp_thresholdaction                        日志空间使用空间大于98%时激活

两个存储过程里面都将日志dump tran了,执行后日志段应该是被清空了的。
但是我发现sp_thresholdaction经常被调用,有时候比sp_thresholdaction_second还多
这样看来,日志是不是会瞬间增大,越过40%直接到80%甚至是98%呢?

请大侠给介绍一下,日志段是怎么增大的,多谢啦

作者: Gubuntu   发布时间: 2010-11-19

日志是不是会瞬间增大,越过40%直接到80%甚至是98%呢?



-----------------------------------------------------------------

我觉得是有可能的。 好像我也注意到类似的现象了。

假如有个大的事务,在阈值检测期间使得日志段剩余空间急剧下降低于非最终阈值的话, 有可能会跳过非最终阈值的。

作者: andkylee   发布时间: 2010-11-19