This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ransaction (Process ID 52) was deadlocked on lock resources + SQL Server 2005

 
Jigar Naik
Ranch Hand
Posts: 761
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i m getting below exception....

i have one process which update a table and at the same time another process is trying to update the same table at the same time..

I am using SQL server 2005 and for updating i am using Stored Procedure.



can anybody help me out solving this issue ???
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well deadlocks are expected behaviour now and again in a relational database, which is why databases have recovery mechanisms. If it happens all the time (in a repeatable way) you have an issue in your stored procedure which you will need to address. If it happens fequently in an unrepeatable way you possibly have an issue with your data model (typically a poorly normalized data model), or your transaction times may be too long. It it happens only very occasionally you can code round it - catch the SQLException, check the error code == deadlock and retry the database operation.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic