语言

PublicationMonitor.ChangeMonitorThreshold 方法

定义

更改发布的监视阈值标准。

public:
 void ChangeMonitorThreshold(int metricId, bool enable, int thresholdValue, int shouldAlert);
public void ChangeMonitorThreshold(int metricId, bool enable, int thresholdValue, int shouldAlert);
member this.ChangeMonitorThreshold : int * bool * int * int -> unit
Public Sub ChangeMonitorThreshold (metricId As Integer, enable As Boolean, thresholdValue As Integer, shouldAlert As Integer)

参数

metricId
Int32

发布阈值的ID是否被更改,可以是以下数值之一:

价值

指标名称

1

过期。 监督交易性出版物订阅即将到期。

2

延迟。 监督交易出版物订阅的绩效。

4

合并过期。 监控合并出版物订阅即将到期。

5

合并慢速。 监控低带宽(拨号)连接上的合并同步持续时间。

6

合并快速运行持续时间。 监控高带宽局域网(LAN)连接上的合并同步持续时间。

7

合并快速运行速度。 监控高带宽(LAN)连接上的合并同步速率。

8

合并慢速。 监控低带宽(拨号)连接上的合并同步速率。

enable
Boolean

指定该指标在发布中是启用还是禁用。

thresholdValue
Int32

发表阈值指标的新值。

shouldAlert
Int32

指定当发布阈值达到时是否会生成警报。

注解

ChangeMonitorThreshold该方法只能由db_owner成员调用,或在分发数据库中通过replmonitor固定数据库角色调用。

呼叫 ChangeMonitorThreshold 等同于执行 sp_replmonitorchangepublicationthreshold(Transact-SQL)。

适用于

另请参阅