sp_replmonitorhelppublicationthresholds (Transact-SQL)
適用於:SQL Server Azure 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 | 複寫效能計量的標識碼,可以是下列其中一項。 1expiration - 監視交易式發行集訂閱即將到期。 2latency - 監視交易式發行集訂閱的效能。 4mergeexpiration - 監視合併式發行集訂閱即將到期。 5mergeslowrunduration - 透過低頻寬 (撥號) 連線監視合併同步處理的持續時間。 6mergefastrunduration - 透過高頻寬 (LAN) 連線監視合併同步處理的持續時間。 7mergefastrunspeed - 透過高頻寬 (LAN) 連線監視合併同步處理的同步處理速率。 8mergeslowrunspeed - 透過低頻寬(撥號)連線監視合併同步處理的同步處理速率。 |
title | sysname | 複寫效能計量的名稱。 |
value | int | 效能計量的臨界值。 |
shouldalert | bit | 這是當計量超過此發行集定義的臨界值時,是否應該產生警示;值為 1 表示應該引發警示。 |
isenabled | bit | 如果此發行集的這個復寫效能計量已啟用監視,則為 ;值為 1 表示已啟用監視。 |
傳回碼值
0 (成功) 或 1 (失敗)
備註
sp_replmonitorhelppublicationthresholds會與所有類型的復寫搭配使用。
權限
只有散發資料庫上db_owner或 replmonitor 固定資料庫角色的成員才能執行sp_replmonitorhelppublicationthresholds。