作業持續時間

Microsoft.SQLServer.2008.AgentJob.JobDuration (UnitMonitor)

監視代理程式作業的持續時間。
請注意,所有版本的 SQL Server Express 都不支援 SQL Server Agent Windows 服務; 所以沒有探索到任何適當的物件。

Knowledge Base article:

摘要

SQL 2008 代理程式作業持續時間監視器。監視代理程式作業的持續時間。

組態

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

產生警示

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

間隔 (秒)

此監視器會使用指令碼來監視長期執行的作業。這是該指令碼執行的間隔時間 (秒)。

600

臨界值下限 (分鐘)

此監視器的臨界值下限 (分鐘)。超過此臨界值預設會導致監視器變更至少是警告的狀態。

60

同步處理時間

使用 24 小時制指定的同步處理時間。將會忽略。

 

逾時 (秒)

允許指令碼執行的時間長度 (以秒為單位)。

300

臨界值上限 (分鐘)

此監視器的臨界值上限 (分鐘)。超過此臨界值預設會導致監視器變更為重大狀態。介於此臨界值臨界值下限 (含) 之間時,監視器預設會是警告狀態。

120

Element properties:

TargetMicrosoft.SQLServer.2008.AgentJob
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.AgentLongRunningJobsProviderPerJob
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.AgentJob.JobDuration" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.AgentJob" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.AgentLongRunningJobsProviderPerJob" ConfirmDelivery="false">
<Category>PerformanceCollection</Category>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Success"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>600</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<JobID>$Target/Property[Type="SQL!Microsoft.SQLServer.AgentJob"]/JobID$</JobID>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>