SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to identify which transaction is generating "Longest Transaction Running Time" alert


How to identify which transaction is generating "Longest Transaction Running Time" alert

Author
Message
Lisa R
Lisa R
Old Hand
Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)

Group: General Forum Members
Points: 374 Visits: 196
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!
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65257 Visits: 9671
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


Lisa R
Lisa R
Old Hand
Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)

Group: General Forum Members
Points: 374 Visits: 196
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.
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65257 Visits: 9671
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
Lisa R
Lisa R
Old Hand
Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)Old Hand (374 reputation)

Group: General Forum Members
Points: 374 Visits: 196
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
Ninja's_RGR'us
Ninja's_RGR'us
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65257 Visits: 9671
Counters by themselves are useless.

You need to compare them to a baseline.


This is probably closer to what you need : http://www.red-gate.com/products/dba/sql-monitor
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search