Toad World® Forums

Alert when query by specific user runs x amount of time...


#1

Does anyone know of a way to set up an alert for when a query run by user A has been running for over X minutes?

Thank you!


#2

Morning,

Yes, you can do this via the custom counters. You will need to define a query that you run that returns a 1 or 0 to indicate whether the condition has been met and then use that as the basis of the custom counter, define an alert when it returns a 1.

I’ve assumed you know the SQL for that sort of query, but let me know if not and I’ll throw some sample code your way