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

Name

Percentage of ad-hoc queries

Description

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

All

Databases to collect from

All

Collection frequency

60

Use collected or calculated values

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

Metric collection

Enabled

Alert definition

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