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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

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


0
TimSweet220
Asked:
TimSweet220
  • 6
  • 4
  • 3
  • +2
1 Solution
 
Daniel ReynoldsSoftware Applications Developer / IntegratorCommented:
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.
0
 
jogosCommented:
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 ....
0
 
JoeNuvoCommented:
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
0
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!

 
jogosCommented:
The sollution of JoeNuvo is to determine deadlocks while running your trace.  For the error you had that's not an option.
0
 
TimSweet220Author Commented:
I've requested that this question be deleted for the following reason:

klj;klj
0
 
jogosCommented:
Can anyone translate this reason
0
 
jogosCommented:
can anyone translate this reason for delete?
0
 
TimSweet220Author Commented:
No longer needed.  No solution was supplied
0
 
Anthony PerkinsCommented:
>>No solution was supplied <<
And unfortunately no feedback either or we may have been able to help you.
0
 
jogosCommented:
I see 'yes it can' + can you give more info/code?
 'dev boxes vulnareble', proces starts/uncommited)
how to trace 'when reproducable'
=> 3 contributors who gave a little help on how to find the source

Which question is not answered?  If you refer to the " Can it happen with temp tables that are created w/tin the proc?"-question the anwser was 'can you share the code'. (and if it's a 'select into # - construction then yes it's very vulnarable to locks)
0
 
Anthony PerkinsCommented:
>>klj;klj<<
The author has failed to provide a valid reason to delete this thread.
0
 
TimSweet220Author Commented:
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.
0
 
Anthony PerkinsCommented:
>>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?
0
 
jogosCommented:
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.


0
 
TimSweet220Author Commented:
It is reoccurring  and It may very well be a configuration problem in IIS7.

Thanks for you time.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 6
  • 4
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now