Session statistics


Job details

Name: Session statistics
Platform: Sqlserver
Category: Performance
Premium package: SQL Performance package
Description: Collects session statistics.
Long description: Collects session performance statistics from system dynamic management views: sys.dm_exec_sessions, sys.sysprocesses
Version: 2
Default schedule: 0 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2012′ & hasengine=‘YES’ & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
history threshold 7 The maximum number of day to kept statistics for in the historic tables.
collect internal statistics 30 How often (in minutes) size of internal objects should be checked. “Session statistics” job collects a large amount of data in the dbWatch schema tables, so it is important to keep track of space usage in the dbWatch database.
return status 1 Return status value (ALARM – 2, WARNING – 1, or OK – 0) when reached maximum space consumption (parameter “Session repository max size”)
session repository max size 500 Maximum space consumption (in MB) for internal/repository objects that contain session statistics.
exclude logins List of logins to be excluded.
exclude hosts List of hosts where sessions will be excluded from statistics collection.
exclude programs List of programs where sessions will be excluded from statistics collection.

Job Summary

Key Functionalities

Parameters and Thresholds

Name Default Value Description
history threshold 7 Maximum number of days to keep statistics in the historic tables.
collect internal statistics 30 Frequency (in minutes) for checking the size of internal objects.
return status 1 Returns a specific status value when maximum space consumption is reached.
session repository max size 500 Defines the maximum space (in MB) for the session statistics repository.
exclude logins (empty) Specifies which login names to exclude from statistics collection.
exclude hosts (empty) Specifies host names to exclude from statistics tracking.
exclude programs (empty) Specifies program names to exclude from the data collection process.

Dependencies

Presentations and Reporting

Cleanup and Maintenance

System Requirements and Compatibility

This monitoring job is crucial for database administrators who need to maintain performance and manage resources effectively by having detailed insights into the sessions running on their databases.