SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Dead Locks in Sql server 2000
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bpuccha
Starting Member

34 Posts

Posted - 07/05/2013 :  10:33:01  Show Profile  Reply with Quote
Hi, I have a stored procedure which reads records from temp table and insert into request table, at the same time my java code tries to update different row in the same table,i am getting below error in my java code...

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

How to avoid these types of locks? is it posssible to lock the rows instead of table while insertion?

jackv
Flowing Fount of Yak Knowledge

United Kingdom
1912 Posts

Posted - 07/06/2013 :  03:51:07  Show Profile  Visit jackv's Homepage  Reply with Quote
Deadlocks occur because at least two tasks are blocing each other permanently. there are a few different ways of getting the deadlock detail .Once you've identified the deadlock - analyse the transaction logic and make more efficient , read more on detecting deadlocks http://www.sqlserver-dba.com/2012/11/sql-server-how-to-detect-and-troubleshoot-blocking-and-deadlocks.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000