sp_replmonitorhelppublicationthresholds (Transact-SQL)
返回为所监视发布设置的阈值度量指标。 在分发服务器的分发数据库上执行此存储过程,用于监视复制。
语法
sp_replmonitorhelppublicationthresholds [ @publisher = ] 'publisher'
, [ @publisher_db = ] 'publisher_db'
, [ @publication = ] 'publication'
[ , [ @publication_type = ] publication_type ]
[ , [ @thresholdmetricname = ] 'thresholdmetricname'
参数
[ @publisher = ] 'publisher'
发布服务器的名称。 publisher 为 sysname,没有默认值。
[ @publisher_db = ] 'publisher_db'
已发布数据库的名称。 publisher_db为 sysname,无默认值。
[ @publication = ] 'publication'
发布的名称。 publication 为 sysname,无默认值。
[ @publication_type = ] publication_type
如果发布类型。 publication_type为 int,可以是这些值之一。
值 | 说明 |
---|---|
0 | 事务发布。 |
1 | 快照发布。 |
2 | 合并发布。 |
NULL(默认值) | 由复制来确定发布类型。 |
结果集
列名称 | 数据类型 | 描述 |
---|---|---|
metric_id | int | 复制性能度量指标的 ID,可为下列值之一。 1expiration - 监视即将过期的事务发布的订阅。 2latency - 监视事务发布的订阅的性能。 4mergeexpiration - 监视合并发布的订阅即将过期。 5mergeslowrunduration - 通过低带宽(拨号)连接监视合并同步的持续时间。 6mergefastrunduration - 通过高带宽(LAN)连接监视合并同步的持续时间。 7mergefastrunspeed - 通过高带宽(LAN)连接监视合并同步的同步速率。 8mergeslowrunspeed - 通过低带宽(拨号)连接监视合并同步的同步速率。 |
title | sysname | 复制性能度量指标的名称。 |
value | int | 性能度量指标的阈值。 |
shouldalert | bit | 当指标超出此发布的定义的阈值时,是否应生成警报;值为 1 表示应引发警报。 |
isenabled | bit | 是否为此发布的此复制性能指标启用了监视;值 1 表示已启用监视。 |
返回代码值
0 (成功) 或 1 (失败)
注解
sp_replmonitorhelppublicationthresholds用于所有类型的复制。
权限
只有分发数据库上 db_owner 或 replmonitor 固定数据库角色的成员才能执行 sp_replmonitorhelppublicationthresholds。