Service Pack 相容性

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

根据兼容设置监视数据库引擎的 Service Pack 级别

Knowledge Base article:

摘要

此监视器检查该 SQL 实例的 Service Pack 版本。如果它与必需的设置不匹配,将生成一个警告或错误警报。

在初始状态下,监视器配置为在此 Service Pack 级别不为 0 时发出警报。可根据需要使用覆盖进行更改。

原因

不正常状态是由不在所需级别的 Service Pack 级别引起的(默认值为 0)

解决方法

可以通过改为将最新的 Service Pack 应用于 SQL Server 解决此问题

或者,如果当前设置在您的环境内有效: :

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

MatchMonitorHealth

已启用

启用或禁用工作流。

生成警报

定义工作流是否生成警报。

间隔(秒)

运行工作流的重复间隔时间(秒)。

43200

针对 SQL Server 2014 的最低 Service Pack 级别

根据公司策略的最低 Service Pack 级别。默认情况下,该级别等于 0 (整数)。

0

Element properties:

TargetMicrosoft.SQLServer.2014.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2014.ServicePackVersion
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2014: Service Pack 相容性
计算机 {0} 上的 SQL 实例 {1} 的 Service Pack 级别不是最新级别
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2014.DBEngine.Configuration.ServicePackLevel" Accessibility="Public" Enabled="true" Target="SQL2014Core!Microsoft.SQLServer.2014.DBEngine" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2014.ServicePackVersion" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2014.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="SQL2014Core!Microsoft.SQLServer.2014.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="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ServiceName$</SQLServiceName>
<IntervalSeconds>43200</IntervalSeconds>
<GoodValue>2</GoodValue>
</Configuration>
</UnitMonitor>