Product Version Compliance

Microsoft.SQLServer.Linux.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 Cumulative Update. 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 a product version containing the most recent SQL Server Cumulative Update that is available publicly. 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 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.Linux.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.Linux.MonitorType.DBEngine.ServicePackLevel
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL on Linux: Product Version Compliance

The Product Version number of SQL instance {0} on computer {1} is not up to date
Expected version: {2}, actual version: {3}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.Linux.Monitor.DBEngine.ServicePackLevel" Accessibility="Public" Enabled="true" Target="SqlDiscL!Microsoft.SQLServer.Linux.DBEngine" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Linux.MonitorType.DBEngine.ServicePackLevel" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Linux.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>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>200</TimeoutSeconds>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<GoodValue/>
</Configuration>
</UnitMonitor>