Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Find Longstanding Open Transactions

By danw,

Ever forget to commit a transaction and then find out hours later that there is deadlocked transactions all over your database server? Worse yet has one of your coworkers done this to your database server? Never again, this stored procedure will net send the machine that has an open transaction, and send you (The DBA) an email message about who or what has the open transaction. The email message could easily be sent to a pager. It also creates a table called open_transactions_history that stores historical data for you. Simply add the stored procedure and then set it up as a reoccurring job. If you want to report on transactions that have been open for 15 - 30 Minutes set it up to run every 15 Minutes. Enjoy :)

Total article views: 8667 | Views in the last 30 days: 20
 
Related Articles
FORUM

How to store error description in nested transactions

How to store error description in nested transactions

FORUM

Begin transaction ........... commit transaction

Begin transaction ........... commit transaction

FORUM

Transaction Replication:Distributn Agent Error Could Not find stored procedure 'sp_MSdel_co'

Transaction Replication Error under distribution agent:could not find stored procedure 'sp_MSdel_co'...

FORUM

Transaction Log

Transaction Log

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones