MSSQL 2008: 收集数据库活动连接计数

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

SQL 2008 数据库活动连接性能收集规则

Knowledge Base article:

摘要

针对 SQL 2008 数据库的活动连接计数

连接是一种工具,使得客户端能够与数据库进行通信以便执行数据查询和操作。一个数据库客户端可具有若干连接。

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

可替代参数

名称

说明

默认值

已启用

启用或禁用工作流。

间隔(秒)

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

900

同步时间

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

00:00

超时(秒)

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

300

Element properties:

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

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2008.Database.ActiveConnections.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.ActiveConnections.Collection" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.Database">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2008.Database.ActiveConnections.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>