Geeks With Blogs
Neil Smith [blog]code til ur fingers bleed


Cool little trick to determine which sql query which is taking a long time to execute, first while offending query is running from another machine do

EXEC sp_who2

Locate the SPID responsible via Login, DBName and ProgramName columns, then do


The offending query will be in the EventInfo column.  This is a great little time saver for me, before I found out about this I used to split my concatenated query script in to multiple sql files until I located the problem query

Posted on Wednesday, November 9, 2011 4:30 PM | Back to top

Comments on this post: SQL Server-Determine which query is taking a long time to complete

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Neil Smith | Powered by: