sp_replmonitorhelppublicationthresholds (Transact-SQL)

返回为所监视发布设置的阈值度量指标。在分发服务器的分发数据库上执行此存储过程,用于监视复制。

主题链接图标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'
    发布的名称。publicationsysname,无默认值。
  • [ @publication_type= ] publication_type
    发布的类型。publication_type 的数据类型为 int,可以为下列值之一:

    Value 说明

    0

    事务性发布。

    1

    快照发布。

    2

    合并发布。

    NULL(默认值)

    由复制来确定发布类型。

返回代码值

0(成功)或 1(失败)

结果集

列名

数据类型

说明

metric_id

int

复制性能度量指标的 ID,可为下列值之一。

Value

度量名称

1expiration - 监视对事务性发布的订阅是否即将过期。

2latency - 监视对事务性发布的订阅的性能。

4mergeexpiration - 监视对合并发布的订阅是否即将过期。

5mergeslowrunduration - 监视通过低带宽(拨号)连接进行的合并同步的持续时间。

6mergefastrunduration - 监视通过高带宽 (LAN) 连接进行的合并同步的持续时间。

7mergefastrunspeed - 监视通过高带宽 (LAN) 连接进行的合并同步的同步速率。

8mergeslowrunspeed - 监视通过低带宽(拨号)连接进行的合并同步的同步速率。

title

sysname

复制性能度量指标的名称。

value

int

性能度量指标的阈值。

shouldalert

bit

指定在度量指标超过为此发布定义的阈值时是否生成警报;值为 1 指示应引发警报。

isenabled

bit

指示是否为此发布的这一复制性能度量指标启用监视;值 1 指示启用监视。

备注

sp_replmonitorhelppublicationthresholds 用于所有类型的复制。

权限

只有分发数据库上的 db_ownerreplmonitor 固定数据库角色的成员才能执行 sp_replmonitorhelppublicationthresholds

请参阅

其他资源

How to: Programmatically Monitor Replication (Replication Transact-SQL Programming)

帮助和信息

获取 SQL Server 2005 帮助