Replication:distribution 中一直在运行 waitfor delay @strdelaytime 语句
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 @strdelaytime
end -- 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:
Caching, Refresh, and Replication Monitor Performance
Replication:distribution 中一直在运行 waitfor delay @strdelaytime 语句的更多相关文章
- distribution 中一直在运行 waitfor delay @strdelaytime 语句
		
Replication 自动创建来一个 Job:Replication monitoring refresher for distribution,这个Agent执行一个sp: dbo.sp_repl ...
 - jmeter中一次运行多条sql语句
		
操作比较简单,主要就分两步: 第一步:在JDBC Connection Configuration中设置,主要见下图标注部分增加:?allowMultiQueries=true 第二步:在JDBC R ...
 - 执行Sqlserver中waitfor delay延时操作或waitfor time定时操作
		
private static string connectionString = RBAC.Dal.DataRootBase.ConnectionString; private SqlConnecti ...
 - SQL两个事务update同一张表出现的死锁问题(waitfor delay)
		
抄录网址:https://blog.csdn.net/qiumuxia0921/article/details/50574879 下面是我们的建表语句: SET ANSI_NULLS ON GO SE ...
 - SQL Server的WAITFOR DELAY注入
		
SQL Server的WAITFOR DELAY注入 WAITFOR是SQL Server中Transact-SQL提供的一个流程控制语句.它的作用就是等待特定时间,然后继续执行后续的语句.它包含 ...
 - Chrome扩展开发之二——Chrome扩展中脚本的运行机制和通信方式
		
目录: 0.Chrome扩展开发(Gmail附件管理助手)系列之〇——概述 1.Chrome扩展开发之一——Chrome扩展的文件结构 2.Chrome扩展开发之二——Chrome扩展中脚本的运行机制 ...
 - Windows 8 IIS中配置PHP运行环境的方法
		
在Windows 8 的IIS(8.0)中搭建PHP运行环境: 一:安装IIS服务器 1.进入控制面板>>程序和功能>>打开或关闭Windows 功能,找到Internet信息 ...
 - INNO setup安装卸载钱判断进程中是否在运行总结
		
1.安装前判断进程中是否有程序在运行. [files] ; 安装前判断进程,dll文件放在inno的安装目录中Source: compiler:psvince.dll; Flags: dontcopy ...
 - 工作的思考十七:工作中容易犯的错误 - Delay
		
其实IT是一个很严谨的行业,不管是从代码角度还是从日常的工作分配都是按计划来的. 从今年年初到现在,在我的工作中出现了两次“Delay”,第一次不以为然,虽然上司也找过我谈话,但没意识到问题的严重性. ...
 
随机推荐
- windows10删除多出的oem分区
			
某次windows升级后,磁盘管理里新出现一个500多M的OEM分区 其实系统里本来就有一个OEM分区是第一个分区,大小499M,可能因为这个分区太小,系统就又新建一个 因为在windows10分区后 ...
 - python 和 R 语言中的等差数列
			
等差数列的通项公式:an = a0 + n*d. 数学上 n 是可以取遍整个整个正整数集的,在现实中,n 是有范围的. 1.R 语言用 seq() 函数产生等差数列: 2.python 中 ran ...
 - Celery详解(1)
			
在学习Celery之前,我先简单的去了解了一下什么是生产者消费者模式. 生产者消费者模式 在实际的软件开发过程中,经常会碰到如下场景:某个模块负责产生数据,这些数据由另一个模块来负责处理(此处的模块是 ...
 - contact form 7如何搭配Akismet过滤垃圾邮件
			
contact form 7有很多站长在用,但是经常会有一些垃圾邮件进来,如何过滤呢?两个方法:1.表单提交启用验证码功能,很多垃圾邮件是用软件扫相应的端口,然后批量群发,如果用验证码了可以过滤很大一 ...
 - 03-C#笔记-数据类型
			
--- # 1 数据类型 --- ## 1 和C++不同的数据类型: byte: 8位,0~255 decimal:范围大于double,128位 sbyte: 8位,-128~127 uint 32 ...
 - 02-linux-换源-ui方式
			
换软件源 使用清华的软件源. Ubuntu 的 ui 界面操作^换源 System setting -> Software & update -> Download from -& ...
 - maven 配置参数详解
			
引自:搬砖工的奋斗史www.cnblogs.com/laobiao/p/5589025.html <project xmlns="http://maven.apache.org/POM ...
 - HTML基础二-DOM操作
			
http://www.imdsx.cn/index.php/2017/07/27/html2/ DOM(Document Object Model 文档对象模型) 一个web页面的展示,是由html标 ...
 - JQuery校验时间大小
			
常用于按时间条件(起始日-截止日)查询时,进行校验 function checkDate(){ var startTime = $('#startTime').val(); var endTime = ...
 - ESA2GJK1DH1K升级篇: 升级STM32 预热: 单片机定时 使用 http 获取云端文本文件里面的内容,然后显示在液晶屏
			
前言: 实现功能概要 STM32使用AT指令控制Wi-Fi以TCP方式连接咱上节安装的Web服务器,然后使用http的get协议获取云端文本文件里面的内容, 然后把获取的数据显示在OLED液晶屏. ...