このモニターは、SQL Server の長時間実行エージェント ジョブを確認します。
このモニターは、長時間実行 SQL エージェント ジョブがないか確認します。設定されたしきい値よりも長くジョブが実行されていると、警告またはエラー通知が出されます。
異常な状態になるのは、定義されたしきい値よりも長く実行されていた SQL Server エージェント ジョブがあるためです。そのジョブに問題がある可能性があります。
SQL Server エージェントは、特定の時刻または間隔で実行されるようにスケジュールされた SQL Server タスクを実行したり、事態に対処するために管理者によって定義されたアクション (ページまたは電子メールでだれかに警告するなど) またはタスクが対象とする特定の条件を検出したりします。また、SQL Server エージェントは、管理者によって定義されたレプリケーション タスクの実行にも使用されます。
警告またはエラー状態の原因となったジョブを特定するには、状態変更または通知のコンテキスト データを調べます。
SQL Server Management Studio を確認して、実行されているジョブを識別します。これらのジョブが必要以上に長く実行されている場合は、ジョブを調査して原因を見つけます。
sp_help_jobactivity を使用して、現在実行されているジョブに関する情報を表示します。
また、長時間実行されることが想定されるエージェント ジョブがある場合は、次の方法を取ることもできます。
モニターを上書きして、この特定の SQL インスタンスまたはすべてのインスタンスについてしきい値を変更する
この特定の SQL インスタンスまたはすべてのインスタンスについて、モニターを無効にする
Target | Microsoft.SQLServer.2008.Agent | ||
Parent Monitor | System.Health.PerformanceState | ||
Category | PerformanceHealth | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.2008.AgentLongRunningJobsProvider | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.2008.Agent.LongRunningJobs" Accessibility="Public" Enabled="false" Target="SQL2008Core!Microsoft.SQLServer.2008.Agent" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.AgentLongRunningJobsProvider" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.Agent.LongRunningJobs.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<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/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>