訂閱者上的複寫代理程式負載。

Microsoft.SQLServer.2012.Replication.Monitor.SubscriberAgentsLoad (UnitMonitor)

訂閱者上的複寫代理程式 (散發和合併) 負載

Knowledge Base article:

摘要

此監視器會計算在臨界值定義的時段內,訂閱者上每個複寫代理程式 (散發、合併) 的執行時間總計。若有任何代理程式的執行時間總計超過所定義的臨界值,就會以該格式引發警示。

訂閱者 (名稱: '{0}',伺服器: '{1}') 偵測到 {2}% 的使用率。

原因

解決方式

開啟重試的代理程式作業記錄,查看是否有任何錯誤訊息,然後視情況調查並解決錯誤。

在作業執行時執行 sp_who2,並檢查其是否被某個其他工作階段封鎖。如果被封鎖,請解除封鎖或等候其他工作階段完成。

確定散發者與訂閱者 (散發代理程式) 之間的網路延遲不會太高。

識別及調查任何執行緩慢的查詢。

針對訂閱資料庫執行 sp_updatestats,以確定統計資料為最新的資料。 ( http://msdn.microsoft.com/library/ms173804.aspx)

確定訂閱資料庫上的索引沒有被嚴重分段。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用工作流程

錯誤臨界值

錯誤臨界值

4

產生警示

定義工作流程是否產生警示

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

300

測量週期 (小時)

用於測量的時間週期 (小時)

24

逾時 (秒)

逾時 (秒)

300

同步處理時間

同步處理時間

 

警告臨界值

警告臨界值

3

Element properties:

TargetMicrosoft.SQLServer.2012.Replication.Subscriber
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.Replication.MonitorType.DistributorAgentsLoad
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL2012 複寫: 訂閱者上的複寫代理程式正在大量負載的情況下執行。
在過去 24 小時期間,訂閱者 (名稱: '{0}',伺服器: '{1}') 經歷大量負載的情況已達 {2} 小時。
{3}
RunAsMicrosoft.SQLServer.Replication.Monitoring.RunAs.Monitor

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Replication.Monitor.SubscriberAgentsLoad" Accessibility="Public" Enabled="true" Target="MS2RD!Microsoft.SQLServer.2012.Replication.Subscriber" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.Replication.MonitorType.DistributorAgentsLoad" ConfirmDelivery="false" RunAs="MSRL!Microsoft.SQLServer.Replication.Monitoring.RunAs.Monitor">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Replication.Monitor.SubscriberAgentsLoad.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericSubscriber']/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericSubscriber']/ConnectionString$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='LoadHours']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='Message']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Health" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<SqlTimeout>300</SqlTimeout>
<ConnectionString>$Target/Property[Type='MSRL!Microsoft.SQLServer.Replication.Library.GenericSubscriber']/ConnectionString$</ConnectionString>
<WarningThreshold>3</WarningThreshold>
<ErrorThreshold>4</ErrorThreshold>
<LastHours>24</LastHours>
<CategoryList>Distribution, Merge</CategoryList>
<ExcludeCategoryList/>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>