Re: Preventing deadlocks

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Gugick (davidg-nospam_at_imceda.com)
Date: 12/07/04


Date: Tue, 7 Dec 2004 14:16:37 -0500

Maury Markowitz wrote:
> "David Gugick" wrote:
>> A deadlock does not kill a connection. It only raises an error.
>
> That's the problem. The deadlock is occuring because one application
> died out on the network and is holding its query open. Then when
> someone else issues the same query, it gets stuck. At least I think
> that's what's happening.
>

That's a blocking issue, not a deadlocking issue as you now know. SQL
Server will eventually release those locks, but it can take some time
until it clears up the connection. Why is the application dying in the
first place?

There is a lock timeout and query timeout that you should be able to set
from your Access code. The lock timeout determines how long a process
will wait on a locked resource before the query is automatically
cancelled. I believe you'll still need to issue a rollback if that
happens.

I don't know enough about Access to help more than that.

-- 
David Gugick
Imceda Software
www.imceda.com 


Relevant Pages

  • Re: Deadlock analysis
    ... Serializable means that if you are in a transaction and execute a SELECT ... this by getting a shared lock on a range of rows in the table. ... Now if another connection does ... It will now be blocked by the second connection and we have a deadlock. ...
    (microsoft.public.sqlserver.programming)
  • Re: Deadlock analysis
    ... You are using transaction isolation level "serializable". ... It does this by getting a shared lock on a range of rows in the table. ... Since 'Charles" is between 'Bill' and 'George', this connection will now have a shared lock on every value between 'Bill' and 'George'. ... Notice that this deadlock occurs even though one connection was only concerned with 'Charles' and the other only with 'David'. ...
    (microsoft.public.sqlserver.programming)
  • Re: CLR Deadlock?
    ... It seems that when you disable/enable network connection, remoting opens new ... lot of problems with remoting as there is no timeout on TCP channel. ... That thread does not acquire any locks, so it should not deadlock. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Deadlock Problem
    ... tables in reverse order you will most likely only block and not deadlock. ... > Another query wants to update the same row in 'MyTable' at the same ... > The first query above is called from one process, the second query ...
    (microsoft.public.sqlserver.server)
  • Re: why cant I create a deadlock
    ... during the 5 seconds, kick off the 2nd query, the 2nd query will then update ... employees and walk into the 1st's lock on categories and a deadlock will ... Im trying to create a deadlock for testing ... > begin transaction ...
    (microsoft.public.sqlserver.server)