PublicationMonitor.ChangeMonitorThreshold メソッド

パブリケーションの監視しきい値を変更します。

名前空間:  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
    変更するパブリケーションしきい値の ID を指定します。次のいずれかの値を指定します。値基準名1Expiration。 トランザクション パブリケーションへのサブスクリプションに期限が迫っていないかを監視します。 2Latency。 トランザクション パブリケーションへのサブスクリプションのパフォーマンスを監視します。 4Mergeexpiration。 マージ パブリケーションへのサブスクリプションに期限が迫っていないかを監視します。 5Mergeslowrunduration。 低帯域 (ダイヤルアップ) 接続でのマージ同期の期間を監視します。 6Mergefastrunduration。 高帯域ローカル エリア ネットワーク (LAN) 接続でのマージ同期の期間を監視します。 7Mergefastrunspeed。 高帯域 (LAN) 接続でのマージ同期の同期率を監視します。 8Mergeslowrunspeed。 低帯域 (ダイヤルアップ) 接続でのマージ同期の同期率を監視します。
  • enable
    型: System.Boolean
    パブリケーションに対して基準を有効にするか無効にするかを指定します。
  • thresholdValue
    型: System.Int32
    パブリケーションしきい値の新しい値です。
  • shouldAlert
    型: System.Int32
    パブリケーションしきい値に達した場合に警告が生成されるかどうかを指定します。

説明

ChangeMonitorThreshold メソッドを呼び出すことができるのは、ディストリビューション データベースの固定データベース ロール db_owner または replmonitor のメンバーだけです。

ChangeMonitorThreshold を呼び出すと、sp_replmonitorchangepublicationthreshold (Transact-SQL) を実行したのと同じことになります。

関連項目

参照

PublicationMonitor クラス

Microsoft.SqlServer.Replication 名前空間

その他の技術情報

レプリケーションをプログラムから監視する (RMO プログラミング)