MSSQL 2016: 資料庫使用中工作階段計數

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

SQL 2016 資料庫使用中工作階段效能集合規則

Knowledge Base article:

摘要

SQL 2016 資料庫的使用中工作階段計數

使用中工作階段計量會顯示資料庫的外部用戶端連接與內部系統連接總和。如果此計量很高,連接的用戶端可能會發生效能問題,而其他未連接的用戶端可能會在存取資料庫時遇到問題。

您可以在<sys.dm_exec_sessions (Transact-SQL)>文件集中找到詳細資訊

http://go.microsoft.com/fwlink/?LinkId=799303

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

間隔 (秒)

執行工作流程的週期性時間間隔 (秒)。

900

同步處理時間

使用 24 小時制指定的同步處理時間。將會忽略。

00:15

逾時 (秒)

指定允許工作流程在關閉且標示為失敗之前執行的時間。

300

Element properties:

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

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SQLServer.2016.Database.ActiveSessions.Collection" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.Database">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2016.Database.ActiveSessions.DataSourceMapped" RunAs="GPMP!Microsoft.SQLServer.MonitoringAccount">
<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>