Description
This alert will tell you when an SQL statement has executed more often in the last 2 hours than it normally does. This example uses a 150% threshold, meaning the SQL has executed 1.5 as many times as normal. The alert definition uses the last 14 days for each SQL statement as the baseline for execution counts per hour. It then compares the number of average executions in the last 2 hours with the baseline to derive the percent increase. It also uses summary data so running it more frequently than once an hour will not have benefit.
Alert Definition
To create the alert, click on Alerts > Manage Alerts tab and create a Custom Alert of type Custom SQL Alert - Multiple Numeric Return. Configure the alert as needed and paste in the attached query.