I have a stored procedure that is currently running, and seems to hang/lock on a specific query. How can i see which query? Preferably without modifying the proc.
Using
DBCC Inputbuffer (65)
gives me
Language Event 0 EXEC mySP;
I have a stored procedure that is currently running, and seems to hang/lock on a specific query. How can i see which query? Preferably without modifying the proc.
Using
DBCC Inputbuffer (65)
gives me
Language Event 0 EXEC mySP;
There is an excellent stored procedure to get extended information on currently running queries. It's available to download from: http://whoisactive.com
Use SQL Profiler; as the name suggests, it's the main profiling tool for SQL Server and it can show the execution time for each statement inside a procedure.