Reproducing a Conversion Deadlock

Posted by Alexander Kuznetsov on SQL Blog See other posts from SQL Blog or by Alexander Kuznetsov
Published on Wed, 02 Jun 2010 13:39:00 GMT Indexed on 2010/06/02 14:05 UTC
Read the original article Hit count: 337

Filed under:
|
Even if two processes compete on only one resource, they still can embrace in a deadlock. The following scripts reproduce such a scenario. In one tab, run this: CREATE TABLE dbo.Test ( i INT ) ; GO INSERT INTO dbo.Test ( i ) VALUES ( 1 ) ; GO SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ; BEGIN TRAN SELECT i FROM dbo.Test ; --UPDATE dbo.Test SET i=2 ; After this script has completed, we have an outstanding transaction holding a shared lock. In another tab, let us have that another connection have...(read more)

© SQL Blog or respective owner

Related posts about Deadlocks

Related posts about Transact SQL