[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Lock Outs

Posted on 2005-04-25
4
Medium Priority
?
204 Views
Last Modified: 2010-03-19
I developed two stored procedures on Friday for two seperate Crystal Reports, every time I run them I get a message saying that I am deadlock victime, error 4001, failed to open a rowset. This does not happen for any other stored procedures, only 2 I wrote within an hour of each other. Is there any I can do about this or should I delete them and rewrite them?
0
Comment
Question by:polynominal
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Jan Franek
ID: 13862551
If you can wait with second report until the first one finishes, thet will be no deadlock. But if you must run these reports simultaneously, you will probably have to redesign your procedures. There's a simple rule - access tables in the same order - tis way you can get locks, but you will probably avoid deadlocks.
0
 
LVL 9

Accepted Solution

by:
xenon_je earned 750 total points
ID: 13862687
use the nolock option...especialy because you have reports, which do nopt need locks on the tables...

eg: select * from test with nolock

regards,
   xenon
0
 

Author Comment

by:polynominal
ID: 13864609
Hi, Thanks for the answers

I am not running the two reports together they are being run seperately, but still lock out individually
0
 
LVL 9

Expert Comment

by:xenon_je
ID: 13872776
did you tested the nolock option? did it helped or no joy?




0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question