Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 procedure causes lock

Author  Topic 

maevr
Posting Yak Master

169 Posts

Posted - 2010-11-17 : 05:25:26
In my production database a stored procedure is all of a sudden causing a lock that lasts several hours, but eventually everything is fine. SQL 2005 std

I have a development database that is a exact copy of the production database and here everything works ok. SQL 2008 std

Worth mentioning is that this stored procedure has been working for several years without problems

The stored procedure is using a view to update 290 rows in a table.

Any tips would be appreciated!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-11-17 : 11:56:32
You'll need to post the code, and the execution plan.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-11-17 : 12:35:49
can hard to debug when you can't see it

Do you do a trace?


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -