PublicationMonitor.ChangeMonitorThreshold 方法

Changes the monitoring threshold metric for a publication.

命名空间:  Microsoft.SqlServer.Replication
程序集:  Microsoft.SqlServer.Rmo(在 Microsoft.SqlServer.Rmo.dll 中)

语法

声明
Public Sub ChangeMonitorThreshold ( _
    metricId As Integer, _
    enable As Boolean, _
    thresholdValue As Integer, _
    shouldAlert As Integer _
)
用法
Dim instance As PublicationMonitor 
Dim metricId As Integer 
Dim enable As Boolean 
Dim thresholdValue As Integer 
Dim shouldAlert As Integer

instance.ChangeMonitorThreshold(metricId, _
    enable, thresholdValue, shouldAlert)
public void ChangeMonitorThreshold(
    int metricId,
    bool enable,
    int thresholdValue,
    int shouldAlert
)
public:
void ChangeMonitorThreshold(
    int metricId, 
    bool enable, 
    int thresholdValue, 
    int shouldAlert
)
member ChangeMonitorThreshold : 
        metricId:int * 
        enable:bool * 
        thresholdValue:int * 
        shouldAlert:int -> unit
public function ChangeMonitorThreshold(
    metricId : int, 
    enable : boolean, 
    thresholdValue : int, 
    shouldAlert : int
)

参数

  • metricId
    类型:System.Int32
    Is the ID of the publication threshold metric being changed and can be one of these values:ValueMetric Name1 Expiration. Monitors for imminent expiration of subscriptions to transactional publications.2 Latency. Monitors for the performance of subscriptions to transactional publications.4 Mergeexpiration. Monitors for imminent expiration of subscriptions to merge publications.5 Mergeslowrunduration. Monitors the duration of merge synchronizations over low-bandwidth (dial-up) connections.6 Mergefastrunduration. Monitors the duration of merge synchronizations over high-bandwidth local area network (LAN) connections.7 Mergefastrunspeed. Monitors the synchronization rate of merge synchronizations over high-bandwidth (LAN) connections.8 Mergeslowrunspeed. Monitors the synchronization rate of merge synchronizations over low-bandwidth (dial-up) connections.
  • enable
    类型:System.Boolean
    Specifies whether the metric is enabled or disabled on the publication.
  • thresholdValue
    类型:System.Int32
    New value for the publication threshold metric.
  • shouldAlert
    类型:System.Int32
    Specifies whether or not an alert is generated when the publication threshold metric is reached.

注释

The ChangeMonitorThreshold method can only be called by members of the db_owner or replmonitor fixed database roles in the distribution database.

Calling ChangeMonitorThreshold is equivalent to executing sp_replmonitorchangepublicationthreshold (Transact-SQL).

请参阅

参考

PublicationMonitor 类

Microsoft.SqlServer.Replication 命名空间

其他资源

以编程方式监视复制(RMO 编程)