這會監視散發者上之散發代理程式、記錄讀取器代理程式、合併代理程式、佇列讀取器代理程式及快照集代理程式等複寫代理程式每日的執行時間總計。
此警示會計算過去 24 小時 (預設值) 內,每個複寫代理程式的執行時間總計,並檢查有無任何代理程式的執行時間總計超過所設定的臨界值。
預設臨界值會在 3 小時時產生警告,在 4 小時時產生嚴重警告。
注意: 不會監視連續作業。
當有大量變更及命令需要複寫時,效能可能會出現瓶頸。常見導致瓶頸的原因:
因為資料庫統計資料過時或索引過於分散,所以導致訂閱者的查詢效能變差。
訂閱者上出現資源爭用: 複寫代理程式所執行的寫入查詢,與對訂閱資料庫執行之應用程式的讀取查詢之間,可能出現了爭用的情況。
網路延遲
代理程式層級上未追蹤的錯誤只會在啟用詳細資訊記錄時才會記錄。
從 SQL Server Management Studio 的作業監視器或是從複寫監視器來檢查複寫代理程式的進度訊息。
識別及調查訂閱者上任何執行緩慢的查詢。
確定複寫代理程式活動的效能,未受訂閱者上其他處理序影響而變慢。若發生此狀況,請考慮將這些競爭活動排程在不同時間。
請對散發與訂閱資料庫執行 sp_updatestats,確認統計資料為最新。( http://msdn.microsoft.com/library/ms173804.aspx)
確定訂閱資料庫上的索引沒有被嚴重分段。
您可以在下列文章中找到有關疑難排解複寫效能問題的深入見解: http://technet.microsoft.com/library/ms152522.aspx
啟用詳細資訊記錄,以取得特定複寫代理程式動作/錯誤的詳細資訊: http://support.microsoft.com/kb/312292
名稱 | 描述 | 預設值 |
警示優先順序 | 定義警示優先順序。 | 標準 |
警示嚴重性 | 定義警示嚴重性。 | 錯誤 |
已啟用 | 啟用或停用該工作流程。 | 是 |
錯誤閾值 | 錯誤閾值 | 4 |
產生警示 | 定義工作流程是否要產生警示。 | 是 |
間隔 (秒) | 每次重複執行工作流程之間的時間間隔 (秒)。 | 300 |
測量週期 (小時) | 用於測量的時間週期 (小時) | 24 |
同步處理時間 | 同步處理時間 |
|
逾時 (秒) | 指定工作流程失敗多少次後關閉並標示為失敗。 | 200 |
資料庫連線的逾時 (秒) | 若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。 | 15 |
警告臨界值 | 警告臨界值 | 3 |
Target | Microsoft.SQLServer.Replication.Windows.Distributor | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorAgentsLoad | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Microsoft.SQLServer.Core.RunAs.Monitoring |
<UnitMonitor ID="Microsoft.SQLServer.Replication.Windows.Monitor.ReplicationAgentsLoad" Accessibility="Public" Enabled="true" Target="SQLReplWD!Microsoft.SQLServer.Replication.Windows.Distributor" ParentMonitorID="Health!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Replication.Windows.MonitorType.DistributorAgentsLoad" ConfirmDelivery="false" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Replication.Windows.Monitor.ReplicationAgentsLoad.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/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>
<MachineName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/InstanceName$</InstanceName>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<ConnectionString>$Target/Host/Property[Type='SqlCoreLib!Microsoft.SQLServer.Core.DBEngine']/ConnectionString$</ConnectionString>
<MonitoringType>$Target/Host/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<WarningThreshold>3</WarningThreshold>
<ErrorThreshold>4</ErrorThreshold>
<LastHours>24</LastHours>
<CategoryList>Distribution, LogReader, Merge, QueueReader, Snapshot</CategoryList>
<ExcludeCategoryList/>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
</Configuration>
</UnitMonitor>