SQL Alert when stored procedure executes for too long
I would like to set up a SQL Server 2008 Alert to notify me when any procedure executes for 1 second or longer (just an example). Any ideas? EDIT: Okay, it seems this is not possible. But, just to nudge you in another direction, I know that there are statistics tables in the master database which hold compilation counts, number of calls and other various statistics. Could I maybe periodically query them and then report on it, somehow? no there are no notifications for this. you'll have to set up a trace and poll it every now and then. I'd like to add to Mladen Prajdic's correct answer and to