哈希索引中的空桶百分比

Microsoft.SQLServer.2016.Monitoring.HashIndexEmptyBucketsCountMonitor (UnitMonitor)

此监视器检查 SQL 数据库中的哈希索引空桶计数。

Knowledge Base article:

摘要

此监视器检查此数据库中表的哈希索引的空桶百分比。因为此监视器是整体标准要求的一部分,如果该设置不符合指定的标准,将生成警报。

配置

在创建内存优化表时必须为 bucket_count 参数指定一个值。如果 empty_bucket_percent 小于空桶百分比阈值,监视器将引发警告警报,bucket_count 过低,应该增加。

外部

请参阅更多详细信息:

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

警告

显示索引计数

根据最佳做法未配置索引的显示计数。

5

空桶百分比阈值

空桶百分比阈值,表示哈希索引中的空桶数。

10

已启用

启用或禁用工作流。

生成警报

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

间隔(秒)

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

43200

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

Element properties:

TargetMicrosoft.SQLServer.2016.DBFileGroupFx
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2016.Monitoring.HashIndexEmptyBucketsCount.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2016: 哈希索引中的空桶百分比
计算机“{2}”上 SQL 实例“{1}”中的数据库“{0}”包含带有索引的表,其中桶计数过低且应该增加。{3}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.Monitoring.HashIndexEmptyBucketsCountMonitor" Accessibility="Public" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.DBFileGroupFx" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2016.Monitoring.HashIndexEmptyBucketsCount.MonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2016.Monitoring.HashIndexEmptyBucketsCountMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</AlertParameter1>
<AlertParameter2>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='Status']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Health" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SqlInstanceName>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.ServerRole"]/InstanceName$</SqlInstanceName>
<ConnectionString>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<ServiceName>$Target/Host/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ServiceName$</ServiceName>
<DatabaseName>$Target/Host/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.Database"]/DatabaseName$</DatabaseName>
<IntervalSeconds>43200</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<SyncTime/>
<EmptyBucketPercentThreshold>10</EmptyBucketPercentThreshold>
<ErrorTopLines>5</ErrorTopLines>
</Configuration>
</UnitMonitor>