SQL Server Windows Service

Microsoft.SQLServer.2008.DBEngine.ServiceMonitor (UnitMonitor)

This monitor checks the status of the SQL Database Engine service.

Knowledge Base article:

Summary

This monitor checks the state of the SQL Database Engine Windows Service.

Causes

"Not Running" state of this monitor indicates that SQL DB Engine service is configured to start automatically but in "Stopped" state during the specific time period. This time period is defined in "Unavailable Time" monitor property and could be overridden. By default, this value is 900 secs (15 mins). If SQL DB Engine turn back to “Running” state faster than that time, it means that it was just reset.

If this monitor is too noisy in specific environment please increate "Unavailable Time". Otherwise if it's too latent, please reduce "Unavailable Time" value.

In general, windows service could be stopped by many reasons, including the following:

Resolutions

You can attempt to restart the service using the following link:

Start SQL DB Engine service

You can view other alerts for this instance of SQL Server™ that may be related to this issue using the following link:

View SQL Server Alerts

Overrideable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

Error

Alert only if service startup type is automatic

This may only be set to 'true' or 'false'. If set to 'false', then alerts will be triggered no matter what the startup type is set to. Default is 'true'.

Yes

Enabled

Enables or disables the workflow.

Yes

Generates Alerts

Defines whether the workflow generates an Alert.

Yes

Interval (seconds)

The recurring interval of time in seconds in which to run the workflow.

60

Unavailable Time (seconds)

The minimum duration of service unavailability before considering it unhealthy.

900

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.CheckWinServiceStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
SQL Server Service Stopped
The Windows service for the DB Engine instance {1} has stopped on computer {0}
RunAsDefault

Source Code:

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