平均等待时间

Microsoft.SQLServer.2008.DBEngine.AverageWaitTimeMonitor (UnitMonitor)

针对 2008 数据库的平均等待时间监视器

Knowledge Base article:

摘要

针对 SQL 2008 数据库的平均等待时间监视器

导致等待的每个锁请求的平均等待时间(毫秒)。基于数据库引擎计数器,对于某一 SQL 实例上的所有数据库具有完全相同的值。

原因

发生了锁请求

解决方法

使用系统 DMV (例如 sys.dm_exec_requests)或 SQL Server Management Studio 活动监视器标识正阻塞其他进程的进程。

可替代参数

名称

说明

默认值

警报优先级

定义警报优先级。

正常

警报严重性

定义警报严重性。

警告

已启用

启用或禁用工作流。

生成警报

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

间隔(秒)

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

300

样本数

如果参数阈值超出计数大于或等于样本数,则监视器将处于错误状态

6

阈值

警报阈值

250

超时(秒)

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

300

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.DBEngine.AverageWaitTime.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
SQL 2008 数据库平均等待时间过高
计算机“{1}”上 SQL 实例“{0}”的平均等待时间过高。有关详细信息,请参阅“警报上下文”选项卡。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.DBEngine.AverageWaitTimeMonitor" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.DBEngine.AverageWaitTime.MonitorType" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.DBEngine.AverageWaitTimeMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Normal" MonitorTypeStateID="Normal" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<Threshold>250</Threshold>
<NumSamples>6</NumSamples>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ObjectName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Locks</ObjectName>
</Configuration>
</UnitMonitor>