MSSQL 2008: Collect DB Engine Average Wait Time (ms)

Microsoft.SQLServer.2008.DBEngine.AverageWaitTime.Collection (Rule)

SQL 2008 DB Engine Average Wait Time performance collection rule

Knowledge Base article:

Summary

Average Wait Time (ms) for SQL 2008 DB Engine

The average amount of wait time (milliseconds) for each lock request that resulted in a wait. This counter based on DB engine counter, this counter has identical values for all databases on the one SQL instance.

This is the average wait time in milliseconds to acquire a lock. Lower the value the better it is. If the value goes higher then 500, there may be blocking going on, probably you may to find the cause of blocking and fix it.

Overrideable Parameters

Name

Description

Default Value

Enabled

Enables or disables the workflow.

Yes

Frequency (seconds)

The recurring interval of time in seconds in which to run the workflow.

900

Element properties:

TargetMicrosoft.SQLServer.2008.DBEngine
CategoryPerformanceCollection
EnabledTrue
Instance Name$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Locks
Counter NameAverage Wait Time (ms)
Frequency900
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.Performance.DataProvider Microsoft.SQLServer.SQLProbeAccount
PerfMapper ConditionDetection System.Performance.DataGenericMapper Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2008.DBEngine.AverageWaitTime.Collection" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.DBEngine" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="SystemPerf!System.Performance.DataProvider" RunAs="SQL!Microsoft.SQLServer.SQLProbeAccount">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Average Wait Time (ms)</CounterName>
<ObjectName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/PerformanceCounterObject$:Locks</ObjectName>
<InstanceName>_Total</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>900</Frequency>
</DataSource>
</DataSources>
<ConditionDetection ID="PerfMapper" TypeID="SystemPerf!System.Performance.DataGenericMapper">
<ObjectName>SQL DB Engine:Locks</ObjectName>
<CounterName>$Data/CounterName$</CounterName>
<InstanceName>$Data/InstanceName$</InstanceName>
<Value>$Data/Value$</Value>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>