Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

UPDATE Query gets stuck as a part of the procedure but completes fine when run independently Expand / Collapse
Author
Message
Posted Tuesday, September 3, 2013 1:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:07 AM
Points: 1, Visits: 42
One of the update query which updates a column after joining records from seven tables gets stuck indefinitely when it is running as a part of stored procedure but it completes fine within a minute when i kill the spid of the procedure and run it again manually. Any pointers?
Post #1490795
Posted Tuesday, September 3, 2013 2:07 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:05 PM
Points: 42,462, Visits: 35,522
Can you post the procedure?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1490797
Posted Tuesday, September 3, 2013 4:01 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 2:28 PM
Points: 786, Visits: 691
Your post does not give much details. Do you mean that you first run the stored procedure and it gets stuck on an UPDATE statement. Then you kill the execution of the procedure and then run you the UPDATE statement directly outside the procedure? Or did you first run the procedure from the application, killed the spid, and then ran the procedure directly from SSMS?

In either case, this article on my web site may explain some things for you: http://www.sommarskog.se/query-plan-mysteries.html


Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1491106
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse