SQL Server Performance

Stored procedure hangs, how to tell which statement is currently running?

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Jul 27, 2010.

  1. Anonymous New Member

    It is a common question that a particular stored procedure is executing for a long time and sometimes looks like it is hanging for longer time. This will cause if you have a trigger looping for the stored procedure actions and using following TSQL you can find which statement is current running or rather you are assuming it is hanging for long time: -- For the best results see the results to Text (CTRL +T before execution) DECLARE @Handle binary(20), @start int, @end int, @SPID int SET @SPID = spid...(<a href="http://sqlserver-qa.net/blogs/t-sql/archive/2010/07/28/9376.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=9376" width="1" height="1">

Share This Page