다음을 통해 공유


PublicationMonitor.ChangeMonitorThreshold Method

Changes the monitoring threshold metric for a publication.

네임스페이스: Microsoft.SqlServer.Replication
어셈블리: Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)

구문

‘선언
Public Sub ChangeMonitorThreshold ( _
    metricId As Integer, _
    enable As Boolean, _
    thresholdValue As Integer, _
    shouldAlert As Integer _
)
public void ChangeMonitorThreshold (
    int metricId,
    bool enable,
    int thresholdValue,
    int shouldAlert
)
public:
void ChangeMonitorThreshold (
    int metricId, 
    bool enable, 
    int thresholdValue, 
    int shouldAlert
)
public void ChangeMonitorThreshold (
    int metricId, 
    boolean enable, 
    int thresholdValue, 
    int shouldAlert
)
public function ChangeMonitorThreshold (
    metricId : int, 
    enable : boolean, 
    thresholdValue : int, 
    shouldAlert : int
)

매개 변수

  • metricId
    Is the ID of the publication threshold metric being changed and can be one of these values:

    Value

    Metric Name

    1

    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
    Specifies whether the metric is enabled or disabled on the publication.
  • thresholdValue
    New value for the publication threshold metric.
  • shouldAlert
    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).

The ChangeMonitorThreshold method is only available with SQL Server 2005.

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

PublicationMonitor Class
PublicationMonitor Members
Microsoft.SqlServer.Replication Namespace

관련 자료

How to: Programmatically Monitor Replication (RMO Programming)