Service Pack Compliance

Microsoft.SQLServer.2016.DBEngine.Configuration.ServicePackLevel (UnitMonitor)

Monitors the service pack level of the database engine against the compliant setting

Knowledge Base article:

Summary

This monitor checks the service pack version for this instance of SQL. A warning or error alert will be raised if it does not match the required setting.

Out of the box, the monitor is configured to alert when the service pack level is not 1. This can be changed using overrides as required.

Causes

An unhealthy state is caused by the service pack level not being at the required level (1 is the default)

Resolutions

This issue may be resolved by changing applying the latest service pack to SQL Server

Alternatively if the current setting is valid within your environment:

Overrideable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

MatchMonitorHealth

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.

43200

Minimal Service Pack level for SQL Server 2016

The minimal Service Pack level as per company policy.

1

Element properties:

TargetMicrosoft.SQLServer.2016.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2016.ServicePackVersion
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: Service Pack Compliance
The service pack level of SQL instance {1} on computer {0} is not up to date
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.DBEngine.Configuration.ServicePackLevel" Accessibility="Public" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.DBEngine" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2016.ServicePackVersion" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.DBEngine.Configuration.ServicePackLevel.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="SPCompliant" MonitorTypeStateID="ValueGood" HealthState="Success"/>
<OperationalState ID="SPNotCompliant" MonitorTypeStateID="ValueBad" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SQLServiceName>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ServiceName$</SQLServiceName>
<IntervalSeconds>43200</IntervalSeconds>
<GoodValue>1</GoodValue>
</Configuration>
</UnitMonitor>