MSSQL 2008: 收集数据库活动会话计数

Microsoft.SQLServer.2008.Database.ActiveSessions.Collection (Rule)

SQL 2008 数据库活动会话性能收集规则

Knowledge Base article:

摘要

针对 SQL 2008 数据库的活动会话计数

活动会话度量指标显示外部客户端连接以及与数据库的内部系统连接的总和。如果此度量指标非常高,则连接的客户端可能存在性能问题,其他未连接客户端在访问数据库时可能会遇到问题。

可在 sys.dm_exec_sessions (Transact-SQL)文档下找到详细信息

http://msdn.microsoft.com/zh-cn/library/ms176013(v=sql.100).aspx

Element properties:

TargetMicrosoft.SQLServer.2008.Database
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2008.Database.ActiveSessions.DataSourceMapped Microsoft.SQLServer.SQLProbeAccount
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.SQLServer.2008.Database.ActiveSessions.Collection" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.Database">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.Database.ActiveSessions.DataSourceMapped" RunAs="SQL!Microsoft.SQLServer.SQLProbeAccount">
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<SyncTime/>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>