Share via


sp_replmonitorchangepublicationthreshold (Transact-SQL)

變更發行集的監視臨界值標準。 這個預存程序用來監視複寫,執行於散發資料庫的散發者端。

主題連結圖示 Transact-SQL 語法慣例

語法

sp_replmonitorchangepublicationthreshold [ @publisher = ] 'publisher' 
        , [ @publisher_db = ] 'publisher_db' 
        , [ @publication = ] 'publication' 
    [ , [ @publication_type = ] publication_type ] 
    [ , [ @metric_id = ] metric_id ] 
    [ , [ @thresholdmetricname = ] 'thresholdmetricname' 
    [ , [ @value = ] value ] 
    [ , [ @shouldalert = ] shouldalert ] 
    [ , [ @mode = ] mode ]

引數

  • [ @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 = ] metric_id
    這是變更發行集的監視臨界值標準的識別碼。 metric_id 是 int,預設值是 NULL,而且可以是下列其中一個值。

    標準名稱

    1

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

    2

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

    4

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

    5

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

    6

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

    7

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

    8

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

    您必須指定 metric_idthresholdmetricname。 如果指定了 thresholdmetricnamemetric_id 就應該是 NULL。

  • [ @thresholdmetricname = ] 'thresholdmetricname'
    這是變更發行集的監視臨界值標準的名稱。 thresholdmetricname 是 sysname,預設值為 NULL。 您必須指定 thresholdmetricname 或 metric_id。 如果指定了 metric_id,thresholdmetricname 就應該是 NULL。

  • [ @value = ] value
    這是發行集臨界值標準的新值。 value 是 int,預設值是 NULL。 如果是 null,就不會更新標準值。

  • [ @shouldalert = ] shouldalert
    這是指當到達發行集臨界值標準時,是否產生警示。 shouldalert 是 bit,預設值是 NULL。 1 值表示產生警示,0 值表示不產生警示。

  • [ @mode = ] mode
    指出發行集臨界值標準是否啟用。 mode 是 tinyint,預設值是 11 值表示啟用這個標準的監視,2 值表示停用這個標準的監視。

傳回碼值

0 (成功) 或 1 (失敗)

備註

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

權限

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

請參閱

概念

以程式設計方式監視複寫