博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
distribution 中一直在运行 waitfor delay @strdelaytime 语句
阅读量:7120 次
发布时间:2019-06-28

本文共 1927 字,大约阅读时间需要 6 分钟。

Replication 自动创建来一个 Job:Replication monitoring refresher for distribution,这个Agent执行一个sp: dbo.sp_replmonitorrefreshjob ,在该SP中存在一个Loop,如下

create procedure sys.sp_replmonitorrefreshjob (    @iterations tinyint = 0 -- 0 - run continuously, non 0 - run for specified iterations    ,@profile bit = 0 -- for internal use - DO NOT DOCUMENT (remove this before release)).....while (1=1)begin--other commands------ wait for given delay--if (@profile = 1)    raiserror('Waitfor delay %s', 10, 1, @strdelaytime)waitfor delay @strdelaytimeend -- while (1=1)


为了有效监控Replication的运行,SQL Server Replication将性能数据缓存起来,周期性的刷新缓存。数据缓存能够减少查询,并且能够供多个User同时查询Replication的性能数据。dbo.sp_replmonitorrefreshjob  用于刷新缓存数据,刷新的周期(@strdelaytime)为4s 或 30s。

Microsoft SQL Server Replication Monitor is designed to efficiently monitor a large number of computers in a production system.The queries that Replication Monitor uses to perform calculations and gather data are cached and refreshed on a periodic basis. Caching reduces the number of queries and calculations required as you view different pages in Replication Monitor and allows monitoring to scale well for multiple users.

Cache refresh is handled by a SQL Server Agent job, the Replication monitoring refresher for distribution. The job runs continuously, but the cache refresh schedule is based on waiting a certain amount time after the previous refresh:

  • If there were agent history changes since the cache was last created, the wait time is the minimum of: 4 seconds; or the amount of time taken to create the previous cache.
  • If there were no agent history changes since the cache was last created (there could have been other changes), the wait time is the maximum of: 30 seconds; or the amount of time taken to create the previous cache.

参考doc:

作者
出处
本文版权归作者和博客园所有,欢迎转载,但未经作者同意,必须保留此段声明,且在文章页面醒目位置显示原文连接,否则保留追究法律责任的权利。
分类:
本文转自悦光阴博客园博客,原文链接:http://www.cnblogs.com/ljhdo/p/5765056.html,如需转载请自行联系原作者
你可能感兴趣的文章
使用nginx+Lua+GraphicsMagick实现图片自动裁剪
查看>>
Win2008R2创建虚拟路由
查看>>
马哥门徒网络班学习计划和学员作品展示
查看>>
oracle删除一个用户
查看>>
Exchange Server 2016管理系列课件20.开启或关闭邮箱功能
查看>>
vSphere与Workstation虚拟机交互的几种方法(一)
查看>>
Wijmo 更优美的jQuery UI部件集:通过jsFiddle测试Wijmo Gauges
查看>>
展望云计算的未来-【沈阳软件】2012年6月刊
查看>>
Word 2003高级技巧之艺术字对齐方式
查看>>
如何从技术岗位走向管理岗位?
查看>>
SCOM 2012 R2监控Microsoft Azure服务(1)配置管理包
查看>>
一步一步使用Ext JS MVC与Asp.Net MVC 3开发简单的CMS后台管理系统之预告篇
查看>>
《敏捷生活练习》打印书籍
查看>>
域控制器 忘记密码 如何重设管理员密码?
查看>>
TypeError: Cannot read property 'url' of undefined
查看>>
【原创】ORACLE的几个函数在MYSQL里面的简单实现
查看>>
Exchange 2013禁止网页修改密码
查看>>
linux运维实战练习-2015年9月5日课程作业(练习)安排
查看>>
演示:取证ICMPv6前缀请求与前缀公告消息原理
查看>>
国家邮政局:《寄递服务用户个人信息安全管理规定》(征求意见稿)公布
查看>>