Script: open transactions with text and plans

[Edit 2017: this query is still entirely applicable on all current versions of SQL Server.] Here’s a little script I knocked up this afternoon to tell me who has open transactions on the server – not just the single oldest active transaction that DBCC OPENTRAN returns. It gives back: session ID login name database context … Continue reading Script: open transactions with text and plans