Share via


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'
    這是發行集的名稱。 publication 是 sysname,沒有預設值。

  • [ @publication_type= ] publication_type
    若是發行集的類型。 publication_type 是 int,而且可以是下列其中一個值。

    說明

    0

    交易式發行集。

    1

    快照式發行集。

    2

    合併式發行集。

    NULL (預設值)

    複寫會嘗試判斷發行集的類型。

結果集

資料行名稱

資料類型

說明

metric_id

int

複寫效能標準的識別碼,它可以是下列項目之一。

標準名稱

1

expiration - 監視交易式發行集的訂閱是否即將到期。

2

latency - 監視交易式發行集的訂閱效能。

4

mergeexpiration - 監視合併式發行集的訂閱是否即將到期。

5

mergeslowrunduration - 監視透過低頻寬 (撥號) 連接進行合併同步處理的持續時間。

6

mergefastrunduration - 監視透過高頻寬 (LAN) 連接進行合併同步處理的持續時間。

7

mergefastrunspeed - 監視透過高頻寬 (LAN) 連接進行合併同步處理的同步處理速率。

8

mergeslowrunspeed - 監視透過低頻寬 (撥號) 連接進行合併同步處理的同步處理速率。

title

sysname

複寫效能標準的名稱。

value

int

效能標準的臨界值。

shouldalert

bit

指出當標準超過針對這個發行集定義的臨界值時,是否應該產生一個警示;1 值表示應該引發警示。

isenabled

bit

指出是否要對這個發行集的這個複寫效能標準啟用監視;1 值表示啟用監視。

傳回碼值

0 (成功) 或 1 (失敗)

備註

sp_replmonitorhelppublicationthresholds 用來搭配使用所有類型的複寫。

權限

只有散發資料庫的 db_ownerreplmonitor 固定資料庫角色成員,才能夠執行 sp_replmonitorhelppublicationthresholds

請參閱

概念

以程式設計方式監視複寫