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”,第一次不以为然,虽然上司也找过我谈话,但没意识到问题的严重性. ...
随机推荐
- nginx日志设置
环境:nginx1.16.1 (1)日志类型:access_log(访问日志) error_log(错误日志)rewrite_log 访问日志:通过访问日志我们可以得到用户的IP地址.浏览器的信息,请 ...
- 【IOS】libimobiledevice常用命令
libimobiledevice 是一个跨平台的软件库,支持 iPhone®, iPod Touch®, iPad® and Apple TV® 等设备的通讯协议. 安装 命令: brew ins ...
- AMD 锐龙三代系列台式机处理器(台积电7纳米工艺)
AMD 锐龙 5 AMD 锐龙 5 3500X 处理器 6核心6线程,基准时钟频率3.6GHz,最大加速时钟频率4.1GHz,一级缓存384KB,总二级缓存3MB,三级缓存32MB,内存支持最高DDR ...
- socket小程序写一个客户端,实现给服务端发送hello World字符串,将客户端发送的数据变成大写后返回
写一个客户端,实现给服务端发送hello World字符串,将客户端发送的数据变成大写后返回 本机id是192.168.xx.xy 服务端 import socket soc = socket.soc ...
- JRebel激活教程
JRebel的官方地址(https://zeroturnaround.com/software/jrebel),土豪可以自行去官网购买. 安装 打开IDEA-->setting-->plu ...
- IComparable<T>.CompareTo(T) 方法
IComparable<T>.CompareTo(T) 方法 定义 命名空间: System 程序集: System.Runtime.dll, mscorlib.dll, netstand ...
- mysql数据库锁的机制-及事务事件
事务隔离级别,脏读.不可重复读.幻读,乐观锁.悲观锁(共享锁.排它锁) 数据库事务具有四个特征,分别是原子性(Atomicity).一致性(Consistency).隔离性(Isoation).持久性 ...
- Pandas | 05 基本功能
到目前为止,我们了解了三种Pandas数据结构以及如何创建它们.接下来将主要关注数据帧(DataFrame)对象,因为它在实时数据处理中非常重要,并且还讨论其他数据结构. 一.系列基本功能 编号 属性 ...
- IIS 加载字体
原文:https://blog.csdn.net/prospertu/article/details/72852500 <system.webServer> <staticConte ...
- Linux下进程间通信方式——使用消息队列
一.什么是消息队列 消息队列提供了一种从一个进程向另一个进程发送一个数据块的方法. 每个数据块都被认为含有一个类型,接收进程可以独立地接收含有不同类型的数据结构.我们可以通过发送消息来避免命名管道的 ...