SQL Server エージェントの Windows サービス

Microsoft.SQLServer.2016.Agent.ServiceMonitor (UnitMonitor)

このモニターは、この SQL Server インスタンスの SQL エージェント サービスの状態を確認します。
SQL Server エージェントの Windows サービスは、いずれのエディションの SQL Server Express でもサポートされていないことにご注意ください。

Knowledge Base article:

概要

このモニターは、SQL エージェント サービスの状態を確認し、自動的に開始するように設定されたサービスが実行されていない場合に通知を生成します。

サービスが無効になっている場合、アラートは生成されず、正常な状態として表示されます。

原因

サービスは次のようなさまざまな理由で停止することがあります。

解決方法

次のリンクを使用して、SQL エージェントの Windows サービスを再開できます。

SQL エージェント サービスの開始

上書き可能なパラメーター

名前

説明

既定値

アラートの優先度

アラートの優先順位を定義します。

アラートの重要度

アラートの重大度を定義します。

エラー

サービスのスタートアップの種類が [自動] の場合にのみ通知

'true' または 'false' にのみ設定できます。'false' に設定すると、設定されている起動の種類に関係なく、アラートがトリガーされます。既定は 'true' です。

はい

有効

ワークフローを有効または無効にします。

はい

アラートを生成する

ワークフローがアラートを生成するかどうかを定義します。

はい

Element properties:

TargetMicrosoft.SQLServer.2016.Agent
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.CheckNTServiceStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: SQL Server エージェントの Windows サービスが停止しました
コンピューター {0} 上で SQL Server インスタンス {1} の SQL Server エージェントの Windows サービスが停止しました
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Agent.ServiceMonitor" Accessibility="Public" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.Agent" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.Agent.ServiceMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Agent"]/ServiceName$</ServiceName>
<CheckStartupType>true</CheckStartupType>
</Configuration>
</UnitMonitor>