Link to home
Start Free TrialLog in
Avatar of TimSweet220
TimSweet220

asked on

Deadlock victim

I'm not sure how this can occur if there are only 5 developers and the sql server is a dev box as well.

Can a stored proc cause this all by it's self.  Can it happen with temp tables that are created w/tin the proc?  

Referral Error: Transaction (Process ID 52) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction


Avatar of Daniel Reynolds
Daniel Reynolds
Flag of United States of America image

Well since you received the error we would have to say the error can happen.

Have you determined the offending Code and tables?

You will probably have to post some of the code to allow us to help much.
Dev boxes are particulary vulnarable for that if some tries something without an explicit commit and leaves his sql window open.  If another process starts and then wait's for that commit that's not comming soon ....
Regardless of how many persons access to database.
By only 2 processes, it can cause deadlock already.

to findout details of deadlock, try run SQL Profiler, and cache the following items
Locks - Deadlock graph
Locks - Lock: Deadlock
Locks - Lock: Deadlock Chain
The sollution of JoeNuvo is to determine deadlocks while running your trace.  For the error you had that's not an option.
Avatar of TimSweet220
TimSweet220

ASKER

I've requested that this question be deleted for the following reason:

klj;klj
Can anyone translate this reason
can anyone translate this reason for delete?
No longer needed.  No solution was supplied
>>No solution was supplied <<
And unfortunately no feedback either or we may have been able to help you.
ASKER CERTIFIED SOLUTION
Avatar of jogos
jogos
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>klj;klj<<
The author has failed to provide a valid reason to delete this thread.
Ok...ok.......good thing I pay for yearly for this.


I looking for the possible reasons other than too much activity work thread  that could cause the lock.

No I can't determine the tables most of them are temp tables dropped with in the proc.
>>Ok...ok.......good thing I pay for yearly for this.<<
I am not sure what that means.  Are you saying your time is more valuable than ours?

>>I looking for the possible reasons other than too much activity work thread  that could cause the lock.<<
Since you may not have access to SQL Profiler or it is too complex for you, have you considered setting a trace flag for a period of time to see what is the cause?
Was it once, (hard to ever find out) or is it reoccurring? The temp-tables do you create them with select into (locks system tables for longer time) or create table?  Do you use transactions. ....
 
We want to help, but you do have to provide enough info.   And each iteration you can get closer to a cause. Is it sure we can find the cause no, But if you don't provide info you can get 50 hints and all beside the problem.


It is reoccurring  and It may very well be a configuration problem in IIS7.

Thanks for you time.