SQL Workload collector


Job details

Name: SQL Workload collector
Platform: Sqlserver
Category: Performance
Description: Collects key SQL Server statistics counters, including Batch Requests/sec, SQL Compilations/sec, and SQL Re-Compilations/sec.
Long description: Collects key SQL Server statistics counters, including Batch Requests/sec, SQL Compilations/sec, and SQL Re-Compilations/sec.
Version: 1.1
Default schedule: 1,6,11,16,21,26,31,36,41,46,51,56 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘sqlserver’]/instance[maj_version > ‘2005′ & hasengine=‘YES’ & (engine_edition = ‘Microsoft SQL Server’ engine_edition = ‘Azure SQL Managed Instance’)]

Parameters

Name Default value Description
keep data for 10 Number of days to provide statistics for.
keep aggregated statistics for 360 Removes aggregate statistics older than this threshold (in days) from the tables dbw_sql_workload_collectorr_aggr and dbw_sql_re_compilations_exp_aggr2.

Job Summary

Details

Implementation

This section outlines the SQL procedural implementation handled by the monitoring job:

Report Generation

The job facilitates the generation of reports showing statistics over time, which are pivotal for trend analysis and performance monitoring:

Dependencies

This job relies on the presence and accessibility of several system views and procedural elements within SQL Server:

Each component must function correctly for the monitoring job to execute without errors and provide accurate and valuable data analyses.

Upgrade Notes

From version 1.0:

Compatibility

This job script is compatible with SQL Server instances (from version 2005 onwards) and Azure SQL Managed Instances, wherein it checks for specific engine editions and versions to ensure proper installation and configuration.