SQL Server deadlocks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL Server deadlocks

Vince Clark
This is REALLY frustrating. Problem does not occur with Postgres. Haven't tested other databases.

I'm using the default isolation level, read committed and have tried jTDS and M$ jdbc 4 drivers. I'm batch loading orders from a legacy system using a custom simple method and get deadlocks to the point that I have to shutdown the appserver. When I run the job the Order tables and JobSandbox locks up completely. Also tried changing isolation level to None. Not sure what data implications that has, but didn't seem to help anyway.

I would think this is a problem with my code but it runs without a problem on Postgres. I did some searching and found suggestions that it has to do with indexing on tables. Most suggestions requireusing a tool to analyze the query causing the deadlock and adding indexes accordingly. Seems excessive.



Vince Clark
www.globalera.com
[hidden email]
(303) 493-6723 office
(303) 523-4843 cell

Reply | Threaded
Open this post in threaded view
|

Re: SQL Server deadlocks

Vince Clark
Update. I commented out all the send notification services that get called during the shipping process. They are all async and apparently are contributing to the deadlock issue. It seems to have solved my problem for now but performance is still bad during my order import process.

Next step is to investigate the setup of SQL Server with the DBA. Hopefully I will discover some default lock setting on the sql server side that is the real culprit.

Vince Clark
www.globalera.com
[hidden email]
(303) 493-6723 office
(303) 523-4843 cell


----- Original Message -----
From: "Vince Clark" <[hidden email]>
To: "user" <[hidden email]>
Sent: Tuesday, August 25, 2009 10:56:30 PM GMT -07:00 US/Canada Mountain
Subject: SQL Server deadlocks

This is REALLY frustrating. Problem does not occur with Postgres. Haven't tested other databases.

I'm using the default isolation level, read committed and have tried jTDS and M$ jdbc 4 drivers. I'm batch loading orders from a legacy system using a custom simple method and get deadlocks to the point that I have to shutdown the appserver. When I run the job the Order tables and JobSandbox locks up completely. Also tried changing isolation level to None. Not sure what data implications that has, but didn't seem to help anyway.

I would think this is a problem with my code but it runs without a problem on Postgres. I did some searching and found suggestions that it has to do with indexing on tables. Most suggestions requireusing a tool to analyze the query causing the deadlock and adding indexes accordingly. Seems excessive.



Vince Clark
www.globalera.com
[hidden email]
(303) 493-6723 office
(303) 523-4843 cell