June 21, 2011 at 1:04 pm
If I have a stored procedure that calls other stored procedures and it starts taking longer than it used to, how do I tell what part of the process is hanging? I've run the parent sp with an exec, how can I tell how far it has progressed?
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
June 21, 2011 at 1:07 pm
sys.dm_exec_requests cross apply to sys.dm_exec_sql_text and use substring on the text with the start and end offset. (script is in BoL)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 21, 2011 at 1:10 pm
GilaMonster (6/21/2011)
sys.dm_exec_requests cross apply to sys.dm_exec_sql_text and use substring on the text with the start and end offset. (script is in BoL)
Thanks!
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply