Re: coding for no blocking or deadlocks.

From: John Bell (jbellnewsposts_at_hotmail.com)
Date: 03/13/04


Date: Sat, 13 Mar 2004 07:53:03 GMT

Hi Mannie

It sounds like you are not using stored procedures. If you controlled your
updates through these, you should be able to write re-usable code and the
problem should not happen.

John

"mannie" <anonymous@discussions.microsoft.com> wrote in message
news:C9EB3BC2-0682-4443-B286-D17B46E4FD5E@microsoft.com...
> Ok, Can someone give me an example answer to how you are suppost to update
2 tables in a transaction without causeing blocking.
>
> proc 1
> Begin Transaction
> Update table 1
> update table 2
> end
>
> proc 2
> begin transaction
> update table 2
> update table 1
> end
>
> This causes blocking, I need to do these things without the blocking.
>
> Help is sooooooo appreciated.



Relevant Pages

  • Re: coding for no blocking or deadlocks.
    ... Blocking isn't necessarily bad - the wait times are generally measured in ... msec, but this will also cause deadlocks if the same rows are involved, which are bad. ... Begin Transaction ... > proc 1 ...
    (microsoft.public.sqlserver.programming)
  • Re: coding for no blocking or deadlocks.
    ... Hi Mannie, is this SQL 2000? ... Can someone give me an example answer to how you are suppost to update 2 tables in a transaction without causeing blocking. ... > proc 1 ...
    (microsoft.public.sqlserver.programming)
  • Re: coding for no blocking or deadlocks.
    ... Greg Jackson ... tables in a transaction without causeing blocking. ... > proc 1 ...
    (microsoft.public.sqlserver.programming)
  • RE: bug? socket timeout leaving transaction hung
    ... excessive blocking due to locks is caused by unexpectedly deep transactions levels. ... out if you are in a nested transaction and to deal with it. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: bug? socket timeout leaving transaction hung
    ... The blocking pattern that I see is unlike any other environments. ... but it has an open transaction. ... From the database point of view, ... They are getting key level locks to update single records. ...
    (microsoft.public.sqlserver.jdbcdriver)