Percentage of ad-hoc queries

Install metric...

Metrics install automatically if you have Redgate Monitor installed.

If you are using Redgate’s SQL Server monitoring tool, Redgate Monitor, you can instantly install and run this metric on your servers.

This metric will display the percentage of queries on the server that are ad-hoc queries. A high percentage of ad-hoc queries can indicate that an application is running queries that are not properly parameterized.

Metric definition


Percentage of ad-hoc queries


This metric displays the percentage of queries being run on the server that are ad-hoc queries.

The T-SQL query that will collect data

Instances to collect from


Databases to collect from


Collection frequency


Use collected or calculated values

Leave the Use a calculated rate of change between collections check box unchecked

Metric collection


Alert definition

An alert can be set for this metric once a baseline has been established.