distribution 中一直在运行 waitfor delay @strdelaytime 语句

简介:

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

作者悦光阴
本文版权归作者和博客园所有,欢迎转载,但未经作者同意,必须保留此段声明,且在文章页面醒目位置显示原文连接,否则保留追究法律责任的权利。
分类: TroubleShooting




本文转自悦光阴博客园博客,原文链接:http://www.cnblogs.com/ljhdo/p/5765056.html,如需转载请自行联系原作者
目录
相关文章
|
SQL Oracle 关系型数据库
【MySQL异常】1093 - You can‘t specify target table ‘daily_job‘ for update in FROM clause
【MySQL异常】1093 - You can‘t specify target table ‘daily_job‘ for update in FROM clause
262 0
|
测试技术
loadrunner 运行脚本-Run-time Settings->General->Additional attributes设置
loadrunner 运行脚本-Run-time Settings->General->Additional attributes设置
104 0
SAP QM初阶执行事务代码QDB1,报错- Sampling procedure NM000001 has no sampling scheme-
SAP QM初阶执行事务代码QDB1,报错- Sampling procedure NM000001 has no sampling scheme-
SAP QM初阶执行事务代码QDB1,报错- Sampling procedure NM000001 has no sampling scheme-
SAP QM执行事务代码QE23为检验批录入结果,报错-No selected set exists for the inspection point 200 or plant NMDC-
SAP QM执行事务代码QE23为检验批录入结果,报错-No selected set exists for the inspection point 200 or plant NMDC-
SAP QM执行事务代码QE23为检验批录入结果,报错-No selected set exists for the inspection point 200 or plant NMDC-
SAP QM中阶执行事务代码QDB1,报错- Inspection severity 001 AQL 0.650 not in sampling schema A01-
SAP QM中阶执行事务代码QDB1,报错- Inspection severity 001 AQL 0.650 not in sampling schema A01-
SAP QM中阶执行事务代码QDB1,报错- Inspection severity 001 AQL 0.650 not in sampling schema A01-
SAP QM 执行事务代码QS23为检验特性分配Selected Set的时候报错 - You cannot use entries from catalogs 1 and 3-
SAP QM 执行事务代码QS23为检验特性分配Selected Set的时候报错 - You cannot use entries from catalogs 1 and 3-
SAP QM 执行事务代码QS23为检验特性分配Selected Set的时候报错 - You cannot use entries from catalogs 1 and 3-
|
网络安全
Jmeter系列(44)- 详解 Elapsed time、Latency、Connect Time的含义
Jmeter系列(44)- 详解 Elapsed time、Latency、Connect Time的含义
359 0
【1121】Damn Single (25分)【set】
【1121】Damn Single (25分)【set】 【1121】Damn Single (25分)【set】
104 0
|
SQL 关系型数据库 MySQL
级联slave的延迟计算和query event exe time获取方法
一、级联时间计算方式 比如A->B->C那么C的延迟是计算B还是A的。因为Event的中timestamp没变,但是C计算时间差值却是以B为准。如果时钟同步的情况下,其实基本可以考虑为A的。计算方法可以参考我的《深入理解MySQL主从原理》专栏 逻辑如下: 级联中的Event依然是主库的时间,因此其延迟还是相对主库而言。
753 0
|
SQL Oracle 关系型数据库
[20180320]toad环境中一次fetch等于多少
[20180320]toad环境中一次fetch等于多少.txt --//上午重新看了以前写的一篇文章,链接:http://blog.itpub.net/267265/viewspace-2150845/ --//里面提到toad.
1088 0