Monitor, diagnose and receive alerts to problems across your SQL Servers.
Moderators: eddie davis, david connell, dlkj, Colin Millerchip, priyasinha, Emma A
I've had a quick search and haven't found an answer so apols. if there's one out there...
I have a query regarding the Long Running Query alert, in particular the 'Was running for:' value.
I have left the 'Query running for longer than' at the default 10s so I would expect the alert to to be raised shortly after the 10s threshold has been reached for any given query.
Instead, for all instances of this alert on the server I'm monitoring ithe 'Was running for' is always circa 45s
Why isn't the alert triggered at, say, 11 seconds? I've increased the 'Query running for longer than' to 30s and, as I would expect, am seeing the same results.
Is the alert only triggered once the query has finished executing or is there something else that determines it?
Thanks in advance
- Posts: 1
- Joined: Thu Jul 08, 2010 9:09 am
The alert won't occur immediately after the time set - all that controls is how long the query must be running before it generates an alert.
The actual polling frequency is configured via an XML file (if you do want to change it - bearing in mind more frequent polling may affect server performance).
If you look for "config.xml" (mine is in C:\\Program Files (x86)\\Red Gate\\SQL Response 1\\Alert Repository) you'll see a line containing:
- <!-- This will affect the polling frequency for these alerts; Long running query and Blocked SQL Process - setting to every 45 seconds
This means that the check will be made every 45 seconds; which is why the alert occurs in the way you see. i.e. the query lasted longer than 10 seconds so will trigger the alert, and was still going after 45 seconds, so you get that in the alert detail.
Hope that helps.
- Posts: 1144
- Joined: Wed Jun 16, 2010 11:10 am
- Location: My desk.
Return to SQL Response 1
Who is online
Users browsing this forum: No registered users and 0 guests