Microsoft SQL Server local counters extension

  • Latest Dynatrace
  • Extension
  • Published Oct 27, 2025

Improve the health and performance monitoring of your Microsoft SQL Servers.

Overview dashboardExtension configurationHost injectionUnified analysis screen metrics 1Unified analysis screen metrics 2Metrics collected
1 of 6Overview dashboard

Get started

Overview

Monitor SQL Server health and performance using Dynatrace OneAgent extension.

Microsoft SQL Server database monitoring is based on a local monitoring approach implemented as a Dynatrace OneAgent extension. The extension collects Windows Performance Counters for key performance and health metrics from the SQL Server instances running on the host.

Use cases

  • Understand the resource impact that your applications have on your database.
  • Understand the impact of resource shortages, locks or other database issues have on your application by observing the database server itself.
  • Track health and performance of the MS SQL servers.
  • Speed up the application problem diagnosis, where it’s caused by the database.

Requirements

Elevated User Permissions

Performance counters can only be collected with a user that is part of the "Performance Monitor Users" group, however The Dynatrace Extensions Execution Controller (EEC) runs python extensions as 'LOCAL SERVICE' by default and so cannot query them.

You need to configure the Dynatrace OneAgent EEC to run this extension with elevated 'LOCAL SYSTEM' account privleges.

  • Add an elevated_privileges_extensions configuration option to the extensionsuser.conf file.
    • Windows: C:ProgramData\dynatrace\oneagent\agent\config\extensionsuser.conf
  • elevated_privileges_extensions should be a comma separated list of extensions to run as 'LOCAL SYSTEM' (instead of the default 'LOCAL SERVICE'). The format is: <extensionName>:<extensionVersion>
    • e.g, elevated_privileges_extensions=[com.dynatrace.extension.python.wmi.mssql:*]

Compatibility information

  • OneAgent 1.305+ (Elevated user permissions)

Activation and setup

  • Make sure OneAgent is installed and running on the SQL Server host.
  • Make sure that log monitoring is enabled to be able to troubleshoot the monitoring.
  • Activate the extension from the Hub and select the host/s to enable this on

Details

This extension collects performance counter metrics for SQL Server Instances on a host monitored by a Dynatrace OneAgent.

  • This extension is a re-write of the existing local SQL Server extension which used WMI queries.
  • Performance counter queries are batched and much more efficient.

Feature sets

When activating your extension using monitoring configuration, you can limit monitoring to one of the feature sets. To work properly the extension has to collect at least one metric after the activation.

In highly segmented networks, feature sets can reflect the segments of your environment. Then, when you create a monitoring configuration, you can select a feature set and a corresponding ActiveGate group that can connect to this particular segment.

All metrics that aren't categorized into any feature set are considered to be the default and are always reported.

A metric inherits the feature set of a subgroup, which in turn inherits the feature set of a group. Also, the feature set defined on the metric level overrides the feature set defined on the subgroup level, which in turn overrides the feature set defined on the group level.

Metric nameMetric keyDescription
Latch waitssql-server.local.latches.waitsNumber of latch requests that could not be granted immediately
Metric nameMetric keyDescription
Lock waitssql-server.local.locks.waitsNumber of lock requests that required the caller to wait
Deadlockssql-server.local.locks.deadlocksNumber of lock requests that resulted in a deadlock
Metric nameMetric keyDescription
Buffer cache hitsql-server.local.buffers.cacheHitRatioPercentage of pages found in the buffer cache without having to read from disk
Checkpoint pagessql-server.local.buffers.checkpointPagesNumber of pages flushed to disk by a checkpoint or other operations that require all dirty pages to be flushed
Page life expectancysql-server.local.buffers.pageLifeExpectancyNumber of seconds a page will stay in the buffer pool without references
Metric nameMetric keyDescription
Batch requestssql-server.local.sql.batchRequestsNumber of Transact-SQL command batches received
SQL compilationssql-server.local.sql.compilationsNumber of SQL statement compilations
SQL re-compilationssql-server.local.sql.recompilationsNumber of SQL statement re-compilations
Metric nameMetric keyDescription
Processes blockedsql-server.local.general.processesBlockedNumber of currently blocked processes
Transactionssql-server.local.general.transactionsNumber of transaction enlistments (local, dtc, and bound)
User connectionssql-server.local.general.userConnectionsNumber of users currently connected to SQL Server
Metric nameMetric keyDescription
Page splitssql-server.local.accessMethods.pageSplitsNumber of page splits that occur as a result of overflowing index pages
Metric nameMetric keyDescription
Connection memorysql-server.local.memory.connectionTotal amount of dynamic memory the server is using for maintaining connections
Memory grants outstandingsql-server.local.memory.grantsOutstandingNumber of processes that have successfully acquired a workspace memory grant
Memory grants pendingsql-server.local.memory.grantsPendingNumber of processes waiting for a workspace memory grant
Target server memorysql-server.local.memory.targetAmount of memory that can be consumed by memory manager
Total server memorysql-server.local.memory.totalAmount of memory the server has committed using the memory manager
Free server memorysql-server.local.memory.freeAmount of memory available for SQL Server to use.
Related tags
DatabaseWMIMSSQLMicrosoftApplication Observability