---
title: MSSQL NRDOT metrics reference
source: https://docs.newrelic.com/docs/opentelemetry/database/mssql/metrics-reference
---

> #### 💡 PREVIEW
>
> We're still working on this feature, but we'd love for you to try it out!
>
> This feature is currently provided as part of a preview pursuant to our [pre-release policies](https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/).

Monitor your SQL Server database performance with comprehensive metrics collected by the NRDOT Collector. By default, New Relic collects the metrics referenced in the [Available metrics](#default) section. You can enhance your monitoring by enabling your desired metrics listed in the [Additional metrics](#additional-metrics) section.

## Available metrics [#default]

The following metrics are collected automatically for New Relic UI functionality. These are enabled by default and work on any platform via a direct SQL Server connection.

**Default metrics**

| Metric                                   | Description                                                                                       | Unit               | Type           |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------ | -------------- |
| `sqlserver.batch.request.rate`           | Number of batch requests received by SQL Server                                                   | `{requests}/s`     | Gauge (double) |
| `sqlserver.batch.sql_compilation.rate`   | Number of SQL compilations needed                                                                 | `{compilations}/s` | Gauge (double) |
| `sqlserver.batch.sql_recompilation.rate` | Number of SQL recompilations needed                                                               | `{compilations}/s` | Gauge (double) |
| `sqlserver.lock.wait.rate`               | Number of lock requests resulting in a wait                                                       | `{requests}/s`     | Gauge (double) |
| `sqlserver.page.buffer_cache.hit_ratio`  | Pages found in the buffer pool without having to read from disk                                   | `%`                | Gauge (double) |
| `sqlserver.page.life_expectancy`         | Time a page will stay in the buffer pool. Available attributes: `performance_counter.object_name` | `s`                | Gauge (int)    |
| `sqlserver.user.connection.count`        | Number of users connected to the SQL Server                                                       | `{connections}`    | Gauge (int)    |

## Additional metrics [#additional-metrics]

The following metrics are disabled by default but can be enabled for deeper insights into SQL Server performance and health. These metrics are organized by functionality and most require a direct SQL Server connection.

**Batch / Compilation metrics**

| Metric                                    | Description                                                                                                                                                                       | Unit             | Type           |
| ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------------- |
| `sqlserver.attention.rate`                | Number of SQL attentions (client cancellation interrupts) received per second                                                                                                     | `{attentions}/s` | Gauge (double) |
| `sqlserver.batch.compilation.utilization` | Number of SQL compilations per batch request                                                                                                                                      | `1`              | Gauge (double) |
| `sqlserver.batch.page_split.utilization`  | Number of page splits per batch request                                                                                                                                           | `1`              | Gauge (double) |
| `sqlserver.recompilation.ratio`           | Ratio of SQL recompilations to compilations, expressed as a percentage                                                                                                            | `%`              | Gauge (double) |
| `sqlserver.parameterization.rate`         | Rate of auto-parameterization activity, broken down by result. Available attributes: `sqlserver.parameterization.result` (`auto_attempted`, `safe`, `unsafe`, `failed`, `forced`) | `{params}/s`     | Gauge (double) |
| `sqlserver.plan.execution.rate`           | Rate of plan executions, classified by plan guide result. Available attributes: `sqlserver.plan.guidance.result` (`guided`, `misguided`)                                          | `{executions}/s` | Gauge (double) |

**Database general metrics**

| Metric                                      | Description                                                                                                                                      | Unit                      | Type           |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- | -------------- |
| `sqlserver.database.backup_or_restore.rate` | Total number of backups/restores                                                                                                                 | `{backups_or_restores}/s` | Gauge (double) |
| `sqlserver.database.count`                  | The number of databases. Available attributes: `database.status` (`online`, `restoring`, `recovering`, `pending_recovery`, `suspect`, `offline`) | `{databases}`             | Gauge (int)    |
| `sqlserver.database.execution.errors`       | Number of execution errors                                                                                                                       | `{errors}`                | Gauge (int)    |
| `sqlserver.database.file.size`              | Size of database files. Available attributes: `file_type`, `db.namespace`                                                                        | `By`                      | Gauge (int)    |
| `sqlserver.database.full_scan.rate`         | The number of unrestricted full table or index scans                                                                                             | `{scans}/s`               | Gauge (double) |
| `sqlserver.database.transactions.active`    | Number of active transactions in the database. Available attributes: `db.namespace`                                                              | `{transactions}`          | Gauge (int)    |
| `sqlserver.deadlock.rate`                   | Total number of deadlocks                                                                                                                        | `{deadlocks}/s`           | Gauge (double) |

**Database — I/O & Latency metrics**

| Metric                              | Description                                                                                                                                             | Unit           | Type                     |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------ |
| `sqlserver.database.io`             | The number of bytes of I/O on this file. Available attributes: `physical_filename`, `logical_filename`, `file_type`, `direction`                        | `By`           | Sum (cumulative, int)    |
| `sqlserver.database.latency`        | Total time that the users waited for I/O issued on this file. Available attributes: `physical_filename`, `logical_filename`, `file_type`, `direction`   | `s`            | Sum (cumulative, double) |
| `sqlserver.database.operations`     | The number of operations issued on the file. Available attributes: `physical_filename`, `logical_filename`, `file_type`, `direction`                    | `{operations}` | Sum (cumulative, int)    |
| `sqlserver.database.page_file.size` | Reserved space allocated to the database, broken down by usage state. Available attributes: `db.namespace`, `page_file.state` (`used`, `free`, `total`) | `By`           | Gauge (int)              |

**Failover Cluster / Always-On Availability Groups metrics**

| Metric                                                      | Description                                                                                                                                                                                  | Unit            | Type           |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------------- |
| `sqlserver.failover_cluster.ag.cluster_type`                | Cluster type of the Always-On Availability Group. Available attributes: `ag.name`, `ag.cluster_type` (`wsfc`, `external`, `none`, `unknown`)                                                 | `1`             | Gauge (int)    |
| `sqlserver.failover_cluster.ag.failure_condition_level`     | Failure condition level configured for the Availability Group (1-5). Available attributes: `ag.name`                                                                                         | `1`             | Gauge (int)    |
| `sqlserver.failover_cluster.ag.health_check_timeout`        | Health-check timeout configured for the Availability Group. Available attributes: `ag.name`                                                                                                  | `ms`            | Gauge (int)    |
| `sqlserver.failover_cluster.ag.required_sync_secondaries`   | Number of synchronized secondary replicas required to commit on the Availability Group. Available attributes: `ag.name`                                                                      | `{secondaries}` | Gauge (int)    |
| `sqlserver.failover_cluster.replica.database.queue_size`    | Size of the log-send or redo queue for an AG database replica. Available attributes: `ag.name`, `replica.server_name`, `db.namespace`, `replica.queue_kind` (`log_send`, `redo`)             | `By`            | Gauge (int)    |
| `sqlserver.failover_cluster.replica.database.redo.rate`     | Redo rate for an AG database replica. Available attributes: `ag.name`, `replica.server_name`, `db.namespace`                                                                                 | `By/s`          | Gauge (double) |
| `sqlserver.failover_cluster.replica.flow_control_time`      | Cumulative time spent in AG flow control, in milliseconds per second observed                                                                                                                | `ms`            | Gauge (double) |
| `sqlserver.failover_cluster.replica.role`                   | Role of the availability replica. Available attributes: `ag.name`, `replica.server_name`, `replica.role` (`primary`, `secondary`, `resolving`, `unknown`)                                    | `1`             | Gauge (int)    |
| `sqlserver.failover_cluster.replica.synchronization_health` | Synchronization health of the availability replica. Available attributes: `ag.name`, `replica.server_name`, `replica.sync_health` (`healthy`, `partially_healthy`, `not_healthy`, `unknown`) | `1`             | Gauge (int)    |

**Index & Search metrics**

| Metric                        | Description                    | Unit           | Type           |
| ----------------------------- | ------------------------------ | -------------- | -------------- |
| `sqlserver.index.search.rate` | Total number of index searches | `{searches}/s` | Gauge (double) |

**Latch metrics**

| Metric                                       | Description                                                                                                        | Unit             | Type                     |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------- | ------------------------ |
| `sqlserver.latch.superlatch.count`           | Number of superlatches currently active                                                                            | `{superlatch}`   | Gauge (int)              |
| `sqlserver.latch.superlatch.transition.rate` | Rate of superlatch promotions or demotions. Available attributes: `transition.direction` (`promotion`, `demotion`) | `{transition}/s` | Gauge (double)           |
| `sqlserver.latch.wait.rate`                  | Number of latch waits per second                                                                                   | `{wait}/s`       | Gauge (double)           |
| `sqlserver.latch.wait_time.avg`              | Average time spent waiting for latches (lighter-weight synchronization)                                            | `s`              | Gauge (double)           |
| `sqlserver.latch.wait_time.total`            | Total latch wait time                                                                                              | `s`              | Sum (cumulative, double) |

**Locks (Detailed) metrics**

| Metric                        | Description                                                                                                       | Unit           | Type                  |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------- | --------------------- |
| `sqlserver.lock.timeout.rate` | Total number of lock timeouts                                                                                     | `{timeouts}/s` | Gauge (double)        |
| `sqlserver.lock.wait.count`   | Cumulative count of lock waits that occurred. Available attributes: `workload_group.name` (`default`, `internal`) | `{wait}`       | Sum (cumulative, int) |

**Login / Logout metrics**

| Metric                  | Description             | Unit          | Type           |
| ----------------------- | ----------------------- | ------------- | -------------- |
| `sqlserver.login.rate`  | Total number of logins  | `{logins}/s`  | Gauge (double) |
| `sqlserver.logout.rate` | Total number of logouts | `{logouts}/s` | Gauge (double) |

**Memory metrics**

| Metric                                  | Description                                                                                                                                                                                | Unit       | Type                     |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | ------------------------ |
| `sqlserver.memory.area`                 | Amount of memory used by the SQL Server memory pool. Available attributes: `memory.pool` (`target`, `total`, `sql_cache`, `optimizer`, `connection`, `granted_workspace`, `max_workspace`) | `By`       | Gauge (int)              |
| `sqlserver.memory.cache.object.count`   | Number of cache objects in the SQL Server cache. Available attributes: `cache.state` (`in_use`, `total`)                                                                                   | `{object}` | Gauge (int)              |
| `sqlserver.memory.grants.pending.count` | Total number of memory grants pending                                                                                                                                                      | `{grants}` | Sum (cumulative, int)    |
| `sqlserver.memory.page.count`           | Number of pages in the SQL Server buffer pool. Available attributes: `page.pool` (`cache`, `total`, `target`, `database`, `stolen`, `reserved`, `free`)                                    | `{page}`   | Gauge (int)              |
| `sqlserver.memory.usage`                | Total memory in use. Available attributes: `workload_group.name` (`default`, `internal`)                                                                                                   | `KB`       | Sum (cumulative, double) |

**OS-Level metrics**

| Metric                                        | Description                                                                                                                                | Unit        | Type                     |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------ |
| `sqlserver.computer.uptime`                   | Computer uptime                                                                                                                            | `{seconds}` | Gauge (int)              |
| `sqlserver.cpu.count`                         | Number of CPUs                                                                                                                             | `{CPUs}`    | Gauge (int)              |
| `sqlserver.os.disk.size`                      | Total disk space across volumes hosting SQL Server database files                                                                          | `By`        | Gauge (int)              |
| `sqlserver.os.memory.usage`                   | Amount of system physical memory observed by SQL Server. Available attributes: `memory.state` (`available`, `total`)                       | `By`        | Gauge (int)              |
| `sqlserver.os.memory.utilization`             | Fraction of system physical memory in use by the SQL Server process                                                                        | `1`         | Gauge (double)           |
| `sqlserver.os.scheduler.runnable_tasks.count` | Total number of runnable tasks across online schedulers                                                                                    | `{tasks}`   | Gauge (int)              |
| `sqlserver.os.wait.duration`                  | Total wait time for this wait type. Available attributes: `wait.category`, `wait.type`                                                     | `s`         | Sum (cumulative, double) |
| `sqlserver.os.wait.tasks.count`               | Cumulative number of tasks that have waited on this wait type since SQL Server startup. Available attributes: `wait.category`, `wait.type` | `{tasks}`   | Sum (cumulative, int)    |

**Page Buffer (Detailed) metrics**

| Metric                                              | Description                  | Unit          | Type           |
| --------------------------------------------------- | ---------------------------- | ------------- | -------------- |
| `sqlserver.page.buffer_cache.free_list.stalls.rate` | Number of free list stalls   | `{stalls}/s`  | Gauge (int)    |
| `sqlserver.page.lookup.rate`                        | Total number of page lookups | `{lookups}/s` | Gauge (double) |

**Processes / Sessions metrics**

| Metric                        | Description                                                                                                                                                                                           | Unit          | Type        |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------- |
| `sqlserver.process.count`     | Number of SQL Server processes (user sessions), broken down by status. Available attributes: `process.status` (`background`, `dormant`, `preconnect`, `runnable`, `running`, `sleeping`, `suspended`) | `{processes}` | Gauge (int) |
| `sqlserver.processes.blocked` | The number of processes that are currently blocked                                                                                                                                                    | `{processes}` | Gauge (int) |

**Replica metrics**

| Metric                        | Description                                                                                        | Unit   | Type           |
| ----------------------------- | -------------------------------------------------------------------------------------------------- | ------ | -------------- |
| `sqlserver.replica.data.rate` | Throughput rate of replica data. Available attributes: `replica.direction` (`transmit`, `receive`) | `By/s` | Gauge (double) |

**Resource Pool / Throttling metrics**

| Metric                                              | Description                                                                        | Unit             | Type           |
| --------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------- | -------------- |
| `sqlserver.resource_pool.disk.operations`           | The rate of operations issued. Available attributes: `direction` (`read`, `write`) | `{operations}/s` | Gauge (double) |
| `sqlserver.resource_pool.disk.throttled.read.rate`  | The number of read operations that were throttled in the last second               | `{reads}/s`      | Gauge (int)    |
| `sqlserver.resource_pool.disk.throttled.write.rate` | The number of write operations that were throttled in the last second              | `{writes}/s`     | Gauge (double) |

**Tables metrics**

| Metric                  | Description                                                                                                                 | Unit       | Type                  |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------- |
| `sqlserver.table.count` | The number of tables. Available attributes: `table.state` (`active`, `inactive`), `table.status` (`temporary`, `permanent`) | `{tables}` | Sum (cumulative, int) |

**TempDB metrics**

| Metric                                         | Description                                                                                                                                                       | Unit        | Type                     |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------ |
| `sqlserver.database.tempdb.space`              | Total free space in temporary DB. Available attributes: `tempdb.state` (`free`, `used`)                                                                           | `KB`        | Sum (cumulative, int)    |
| `sqlserver.database.tempdb.version_store.size` | TempDB version store size                                                                                                                                         | `KB`        | Gauge (double)           |
| `sqlserver.tempdb.allocation.wait_time.total`  | Cumulative wait time on tempdb allocation pages, broken down by page type. Available attributes: `allocation.page_type` (`gam`, `sgam`, `pfs`, `other`)           | `s`         | Sum (cumulative, double) |
| `sqlserver.tempdb.contention.waiters.count`    | Number of tempdb pagelatch wait types with at least one active waiter                                                                                             | `{waiters}` | Gauge (int)              |
| `sqlserver.tempdb.data_files.count`            | Number of tempdb data files configured on the instance                                                                                                            | `{files}`   | Gauge (int)              |
| `sqlserver.tempdb.file.size`                   | Size of each tempdb data or log file. Available attributes: `file_type`, `tempdb.file.id`                                                                         | `By`        | Gauge (int)              |
| `sqlserver.tempdb.space.usage`                 | Space used by tempdb, broken down by allocation category. Available attributes: `tempdb.space_kind` (`user_objects`, `internal_objects`, `version_store`, `free`) | `By`        | Gauge (int)              |

**Thread Pool metrics**

| Metric                                      | Description                                                                                                                         | Unit        | Type           |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------- |
| `sqlserver.thread_pool.tasks.count`         | Number of SQL Server tasks broken down by state. Available attributes: `task.state` (`current`, `queued`, `waiting_for_threadpool`) | `{tasks}`   | Gauge (int)    |
| `sqlserver.thread_pool.workers.count`       | Number of SQL Server worker threads broken down by state. Available attributes: `worker.state` (`running`, `suspended_or_sleeping`) | `{workers}` | Gauge (int)    |
| `sqlserver.thread_pool.workers.max`         | Maximum number of SQL Server worker threads configured on the instance                                                              | `{workers}` | Gauge (int)    |
| `sqlserver.thread_pool.workers.utilization` | Fraction of configured SQL Server worker threads currently running                                                                  | `1`         | Gauge (double) |

**Transactions (Detailed) metrics**

| Metric                                          | Description                                                            | Unit               | Type                     |
| ----------------------------------------------- | ---------------------------------------------------------------------- | ------------------ | ------------------------ |
| `sqlserver.transaction.delay`                   | Time consumed in transaction delays                                    | `ms`               | Sum (cumulative, double) |
| `sqlserver.transaction.longest_running_time`    | Age in seconds of the longest currently-open transaction on the server | `s`                | Gauge (double)           |
| `sqlserver.transaction.mirror_write.rate`       | Total number of mirror write transactions                              | `{transactions}/s` | Gauge (double)           |
| `sqlserver.transaction.version_cleanup.rate`    | Cumulative bytes cleaned from the tempdb version store                 | `By`               | Sum (cumulative, double) |
| `sqlserver.transaction.version_generation.rate` | Cumulative bytes of row versions written to the tempdb version store   | `By`               | Sum (cumulative, double) |

### Additional Windows metrics [#additional-windows-metrics]

The following metrics are available on Windows platforms when using the NRDOT Collector with SQL Server. These metrics provide Windows-specific performance insights for SQL Server monitoring.

**Additional Windows metrics**

13 metrics available on Windows platforms

| Metric                                               | Description                                                                               | Unit                 | Type           |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------- | -------------------- | -------------- |
| `sqlserver.computer.uptime`                          | System uptime counter                                                                     | `s`                  | Gauge (double) |
| `sqlserver.cpu.count`                                | Number of CPU cores available                                                             | `{cpu}`              | Gauge (double) |
| `sqlserver.memory.usage`                             | Memory usage by SQL Server process. Available attributes: `memory_type`                   | `By`                 | Gauge (double) |
| `sqlserver.performance_counter.buffer.hit_ratio`     | Percentage of pages found in the buffer cache                                             | `%`                  | Gauge (double) |
| `sqlserver.performance_counter.cache.hit_ratio`      | Ratio of cache hits to cache lookups. Available attributes: `cache_type`                  | `%`                  | Gauge (double) |
| `sqlserver.performance_counter.compilations.rate`    | Number of SQL compilations per second                                                     | `{compilations}/s`   | Gauge (double) |
| `sqlserver.performance_counter.connections`          | Number of user connections to SQL Server                                                  | `{connections}`      | Gauge (double) |
| `sqlserver.performance_counter.locks.count`          | Number of current locks. Available attributes: `lock_type`                                | `{locks}`            | Gauge (double) |
| `sqlserver.performance_counter.locks.timeout.rate`   | Number of lock timeouts per second                                                        | `{timeouts}/s`       | Gauge (double) |
| `sqlserver.performance_counter.memory.grant_pending` | Total number of processes waiting for memory grants                                       | `{processes}`        | Gauge (double) |
| `sqlserver.performance_counter.page.operations.rate` | Number of physical database page operations per second. Available attributes: `page_type` | `{operations}/s`     | Gauge (double) |
| `sqlserver.performance_counter.recompilations.rate`  | Number of SQL recompilations per second                                                   | `{recompilations}/s` | Gauge (double) |
| `sqlserver.performance_counter.transactions.rate`    | Number of transactions per second. Available attributes: `database`                       | `{transactions}/s`   | Gauge (double) |

## Amazon RDS limitations [#rds-limitations]

When monitoring an Amazon RDS for SQL Server instance, certain metrics may report `0` or not be collected due to RDS service restrictions and SQL Server edition limitations.

> #### ⚠️ IMPORTANT
>
> The following limitations apply specifically to SQL Server instances running on Amazon RDS. Self-hosted SQL Server deployments are not affected by these restrictions.

**RDS metric limitations reference**

| Metric                                                                                                                                                                                                                                                                                                                                                                                                                                            | Limitation                                                                                                                    | Affected editions |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------- |
| `sqlserver.database.execution.errors`                                                                                                                                                                                                                                                                                                                                                                                                             | Always reports `0`. SQL Server ML Services (Extensibility Framework) is not provisioned on any Amazon RDS SQL Server edition. | All editions      |
| `sqlserver.failover_cluster.ag.cluster_type`, `sqlserver.failover_cluster.ag.failure_condition_level`, `sqlserver.failover_cluster.ag.health_check_timeout`, `sqlserver.failover_cluster.ag.required_sync_secondaries`, `sqlserver.failover_cluster.replica.database.queue_size`, `sqlserver.failover_cluster.replica.database.redo.rate`, `sqlserver.failover_cluster.replica.role`, `sqlserver.failover_cluster.replica.synchronization_health` | Not collected. Always On Availability Groups require Multi-AZ deployment, unavailable on Web and Express editions.            | Web, Express      |
| `sqlserver.failover_cluster.replica.flow_control_time`, `sqlserver.replica.data.rate`, `sqlserver.transaction.delay`, `sqlserver.transaction.mirror_write.rate`                                                                                                                                                                                                                                                                                   | Emitted but always reports `0`. These measure AG replica activity unavailable without Multi-AZ.                               | Web, Express      |

For more information, refer to [Amazon RDS for SQL Server: Unsupported features](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Concepts.General.FeatureNonSupport.html) and [Multi-AZ for Amazon RDS for SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_SQLServerMultiAZ.html).

## Related documentation [#related-docs]

[Linux instrumentation for self-hosted environments](https://docs.newrelic.com/docs/opentelemetry/database/mssql/linux-hosted)

Learn how to set up MSSQL monitoring in self-hosted Linux environments with New Relic.

[Windows instrumentation for self-hosted environments](https://docs.newrelic.com/docs/opentelemetry/database/mssql/windows-hosted)

Learn how to set up MSSQL monitoring in self-hosted Windows environments with New Relic.

[Set up APM-database correlation](https://docs.newrelic.com/docs/opentelemetry/database/capabilities/db-apm)

Learn how to correlate your application performance with database operations in New Relic.
