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”,第一次不以为然,虽然上司也找过我谈话,但没意识到问题的严重性. ...
随机推荐
- linux安装包制作
1. 常见安装包 打包或压缩文件tar,zip,gz等,一般解压后即可 管理工具的deb,rpm等.这类安装文件可以通过第三方的命令安装 (apt和yum) .bin类,其实就是把sh和zip打包为b ...
- Java 8 Time Api 使用指南-珍藏限量版
前面写过了Stream和Lambda,最近正想写Java 8的Time Api,小胖哥这个文章写得很好,就偷懒转载了. 1.概述 Java 8为Date和Time引入了新的API,以解决旧java.u ...
- CDA数据分析【数据收集】
一.机器收集数据 机器收集数据会从不同角度对数据进行抓取和采集,与之前手动收集数据不同,机器收集数据不再是用小样本.特定样本来采集和分析整体数据,而是采用大样本或整体数据进行分析,这打破了原来的数据分 ...
- INS-35178错误,AMM及ASMM区别
遇到这个报错,就使用asmm 一般先装库,再opatch到最新补丁,最后dbca建库,物理内存大于4G不能用AMM只能用ASMM 内存越大,全自动管理就越费劲,出错概率就越高,内存抖动 oracle的 ...
- Mysql-MariaDB设置延迟同步
CHANGE MASTER TO MASTER_DELAY = N; N为秒数
- stdin,stdout 和 STDOUT_FILENO,STDIN_FILENO
stdin,stdout 等类型为 FILE *. STDIN_FILENO,STDOUT_FILENO,STDERR_FILENO 等类型为 int. 使用 FILE * 的函数主要有:fopen. ...
- Odoo视图的共有标签
转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10826405.html 1)name (必选) 通过name值,查找标签 2)model 与view相关联的 ...
- HTTP中分块编码(Transfer-Encoding: chunked)
转自: 妙音天女--分块传输编码~ 参考链接: HTTP MDN--HTTP协议 一.背景: 持续连接的问题:对于非持续连接,浏览器可以通过连接是否关闭来界定请求或响应实体的边界:而对于持续连接,这种 ...
- axios跨域处理
本质分析: 因为axios在vue中利用中间件http-proxy-middleware做了一个本地的代理服务A,相当于你的浏览器通过本地的代理服务A请求了服务端B,浏览器通过服务A并没有跨域,因此就 ...
- 破解优酷VIP视频
目录 一 破解优酷VIP视频 一 破解优酷VIP视频 import requests import re import json HEADERS = { 'user-agent': 'Mozilla/ ...