|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 9:06 AM
Points: 179,
Visits: 100
|
|
I have created an alert to send me an email when the Longest Transaction Running Time counter rises above a certain threshold. But the description in the email is very vague:
The SQL Server performance counter 'Longest Transaction Running Time' (instance 'N/A') of object 'SQLServer:Transactions' is now above the threshold of 5.00 (the current value is 10.00).
Is there any way to get the email to tell me exactly what transaction generated the alert?
Thanks!
|
|
|
|
|
SSC-Insane
         
Group: General Forum Members
Last Login: Yesterday @ 10:55 PM
Points: 21,357,
Visits: 9,534
|
|
How do you send the alert?
Sql Monitor would have this info (14 free trial).
Or this query :
SELECT * FROM sys.dm_exec_requests WHERE open_transaction_count > 0 ORDER BY start_time DESC
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 9:06 AM
Points: 179,
Visits: 100
|
|
| In SSMS, expand SQL Server Agent, right-click Alerts and select New Alert. When setting up the alert you can specify how you want to be notified.
|
|
|
|
|
SSC-Insane
         
Group: General Forum Members
Last Login: Yesterday @ 10:55 PM
Points: 21,357,
Visits: 9,534
|
|
You'll have to use a job to send you the e-mail which will be 100% customizable.
In the alert ask to start a job, then use my query to generate usefull output, then sp_send_dbmail
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 9:06 AM
Points: 179,
Visits: 100
|
|
Thank you. That should do the trick. I set that up and am waiting for an alert to trigger to test it out.
I now have other alerts that I would also like to set up jobs for but I don't know the query to use. For example, the Full Scans Per Second alert:
The SQL Server performance counter 'Full Scans/sec' (instance 'N/A') of object 'SQLServer:Access Methods' is now above the threshold of 10.00 (the current value is 17.10).
Is there a query that will tell me the table(s) that are being scanned?
In general, is there a way to access the query that is triggering the alerts to be able to get more information from it than the very vague message that it sends?
Thank you
|
|
|
|
|
SSC-Insane
         
Group: General Forum Members
Last Login: Yesterday @ 10:55 PM
Points: 21,357,
Visits: 9,534
|
|
|
|
|