@publisher : the name of the publisher @publisher_db : the name of the published database @pbulication : the name of the publication @publication_type : 0 = transactional publication ................ 1 = snapshot publication ................ 2 = merge publication
@publisher : the name of the publisher @publisher_db : the name of the published database @pbulication : the name of the publication @publication_type : 0 = transactional publication ................ 1 = snapshot publication ................ 2 = merge publication @metric_id : 1 = expiration ................ 2 = latency ................ 4 = mergeexpiration ................ 5 = mergeslowrunduration ................ 6 = mergefastrunduration ................ 7 = mergefastrunspeed ................ 8 = mergeslowrunspeed @thresholdmetricname: the name of the publication threshold ................ (either this parameter or @metric_id is required) @value : the new metric value @shouldalert : generate alert (1=yes;0=no) @mode : monitoring mode (1=on;2=off)
有关以编程方式监视复制的详细信息,请访问官方 Microsoft Docs 站点:
参考:以编程方式监视复制
查询监控详情所需的所有存储过程都有详细信息:
从分发服务器监视发布者、出版物和订阅
监视等待在订阅服务器上应用的事务命令
监视等待上传或下载的合并更改
监视合并代理程序会话
回答你的问题
读取或更改监控阈值所需的存储过程是
sp_replmontirohelppublicationthresholds
和sp_replmonitorchangepublicationthreshold
过程。查看发布的监控阈值指标
参数是:
@publisher : the name of the publisher
@publisher_db : the name of the published database
@pbulication : the name of the publication
@publication_type : 0 = transactional publication
................ 1 = snapshot publication
................ 2 = merge publication
修改发布的监控阈值指标
参数是:
@publisher : the name of the publisher
@publisher_db : the name of the published database
@pbulication : the name of the publication
@publication_type : 0 = transactional publication
................ 1 = snapshot publication
................ 2 = merge publication
@metric_id : 1 = expiration
................ 2 = latency
................ 4 = mergeexpiration
................ 5 = mergeslowrunduration
................ 6 = mergefastrunduration
................ 7 = mergefastrunspeed
................ 8 = mergeslowrunspeed
@thresholdmetricname: the name of the publication threshold
................ (either this parameter or @metric_id is required)
@value : the new metric value
@shouldalert : generate alert (1=yes;0=no)
@mode : monitoring mode (1=on;2=off)