Product Version Compliance

Microsoft.SQLServer.Windows.Monitor.DBEngine.ServicePackLevel (UnitMonitor)

This monitor checks the product version number of the current SQL Server instance to determine the currently installed Cumulative Update.

Knowledge Base article:

Summary

This monitor checks the product version number of the current SQL Server instance to determine the currently installed Service Pack (for SQL Server 2012-2016) or Cumulative Update (for SQL Server 2017-2019). An alert will be raised if the current product version number is lower than the default value set in the monitor properties. As a new version of the management pack is released, the default value is updated to correspond to the product version containing the most recent SQL Server Cumulative Update or Service Pack publicly available. If necessary, the default value can also be changed via the overrides.

Note that a value for the "Minimal product version number for SQL Server" override should be set for objects grouped according to the SQL Server version; at that, a created group should contain instances of the same major version.

The default values are as follows:

According to the Modern Servicing Model, SQL Server Service Packs are no longer available; the servicing is now based on Cumulative Updates released every quarter. See the Announcing the Modern Servicing Model for SQL Server article for more details.

Causes

An unhealthy state of this monitor is caused by product version number of the SQL instance being outdated.

Resolutions

This issue may be resolved by applying the latest update to SQL Server.

Alternatively, if the current settings are valid within your environment:

Overridable 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 product version number for SQL Server

The number of the minimal product version containing the required SQL Server SP or CU.

 

Synchronization Time

The synchronization time specified by using a 24-hour format. May be omitted.

 

Timeout (seconds)

Specifies the time the workflow is allowed to run before being closed and marked as failed.

200

Timeout for database connection (seconds)

The workflow will fail and register an event, if it cannot access the database during the specified period.

15

Element properties:

TargetMicrosoft.SQLServer.Windows.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Windows.MonitorType.DBEngine.ServicePackLevel
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL on Windows: Product Version Compliance

The product version number of the SQL Server instance "{0}" on computer "{1}" is outdated
Expected version: {2}, actual version: {3}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Windows.Monitor.DBEngine.ServicePackLevel" Accessibility="Public" Enabled="true" Target="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Windows.MonitorType.DBEngine.ServicePackLevel" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Windows.Monitor.DBEngine.ServicePackLevel.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='ExpectedVersion']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='ActualVersion']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="SPCompliant" MonitorTypeStateID="ValueGood" HealthState="Success"/>
<OperationalState ID="SPNotCompliant" MonitorTypeStateID="ValueBad" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<MonitoringType>$Target/Property[Type="SqlDiscW!Microsoft.SQLServer.Windows.DBEngine"]/MonitoringType$</MonitoringType>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<GoodValue/>
</Configuration>
</UnitMonitor>