|
Posted by Joe Weinstein on 02/05/06 00:11
Erland Sommarskog wrote:
> Joe Weinstein (joeNOSPAM@bea.com) writes:
>
>>>Two sessions:
>>>
>>>Session 1:
>>>BEGIN TRAN
>>>insert into joe (c1,c2) values (1,2)
>>>
>>>
>>>Session 2:
>>>BEGIN TRAN
>>>insert into joe (c1,c2) values (3,4)
>>>
>>>Session 1:
>>>select * from joe
>>>
>>>Session 2:
>>>select * from joe
>>>
>>>One of the sessions gets a deadlock victim message.
>>>thanks,
>>>Joe
>>
>>PS: This doesn't occur with Sybase, which is fairly closely
>>related...
>
>
> Or was. I don't know what Sybase is doing these days. But neither would
> you get a deadlock on SQL 2005 if you run with snapshot isolation.
Ok. Thanks. However, by default, with SQL2005, why is this a deadlock?
>
> And when I think of it, neither would this deadlock on SQL 6.5, as
> Session 2 would block already on the INSERT, as it would be on a locked
> page...
>
>
Navigation:
[Reply to this message]
|