MS SQL Deadlocks

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
btmi
Posts: 2
Joined: Tue 25 Oct 2005 00:39

MS SQL Deadlocks

Post by btmi » Fri 16 Feb 2007 04:05

I have an installation that is suffering from occasional deadlocks which are extremely difficult to predict or debug. While this may simply be unavoidable, I am curious if anyone that has experienced similar problems can provide any suggestions how to resolve this situation.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 16 Feb 2007 09:22

Please check if you are using FetchAll=False mode with DbxSda. This may be the reason of the deadlock. By default, the FetchAll parameter value is True. You can find the information on how to change this option in the ReadMe.html file. Changing the FetchAll parameter to True should solve the problem.

btmi
Posts: 2
Joined: Tue 25 Oct 2005 00:39

Post by btmi » Mon 19 Feb 2007 12:14

Thank you for your response.

I had specifically set this value to True via this call after the connection had been made:
**Delphi Code***
MyCon.SQLConnection.SetOption(coFetchAll, Integer(True));

and so I do not think this is the answer....any other tips?

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Tue 20 Feb 2007 10:35

The only DbxSda specific mode that can cause deadlocks is FetchAll = False mode.
So, if you use FetchAll = True mode, please see "Deadlocking" in SQL Server 2005 Books Online: http://msdn2.microsoft.com/en-us/ms177433.aspx.

Post Reply