This following code snippet would list all the actively running commands by SPID
select session_id, Text
from sys.dm_exec_requests r
cross apply sys.dm_exec_sql_text(sql_handle) t
This blog is dedicated to all my technical learnings and findings. As they say use all the brains you have and borrow all the brains you can, so this is my share of lending my learnings to all you guys out there. I would like to acknowledge here that some parts of these posts would be reproduced as a part of my web-browsing mainly because having it all in one place is far more convenient.
Showing posts with label List of Actively running commands by SPID in SQL Server. Show all posts
Showing posts with label List of Actively running commands by SPID in SQL Server. Show all posts
Wednesday, May 19, 2010
Subscribe to:
Posts (Atom)