sql server - RangeS-U and U locks at the same time and on the same resource -
i'm working stored procedure , deadlock situation.
i've been using sql server profiler , information deadlock 'deadlock graph' event in form of .xdl file. below content of file.
i've cleared informations statement.the statement marked <executionstack>
in .xdl (for both processes same statement):
select somecolumn, somecolumn2 sometable (updlock) inner join sometable2 on sometable.sometable2id = sometable2.sometable2id inner join sometable3 on sometable2.sometable3id = sometable3.sometable3id somecolumn = @something , somecolumn2 = @something2
and content of .xdl file:
<deadlock-list> <deadlock victim="processc19dc8"> <process-list> <process id="processc19dc8" taskpriority="0" logused="0" waitresource="key: 5:72057594042646528 (8194443284a0)" waittime="1541" ownerid="21923027" transactionname="user_transaction" lasttranstarted="2013-07-02t18:03:42.260" xdes="0x80051950" lockmode="ranges-u" schedulerid="2" kpid="2712" status="suspended" spid="54" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-02t18:03:42.260" lastbatchcompleted="2013-07-02t18:03:42.260" clientapp=".net sqlclient data provider" hostname="xxx" hostpid="2148" loginname="xxx" isolationlevel="serializable (4)" xactid="21923027" currentdb="5" locktimeout="4294967295" clientoption1="671088672" clientoption2="128056"> ... </process> <process id="processc4d048" taskpriority="0" logused="0" waitresource="key: 5:72057594042646528 (a0c936a3c965)" waittime="1541" ownerid="21923023" transactionname="user_transaction" lasttranstarted="2013-07-02t18:03:42.260" xdes="0x80049800" lockmode="ranges-u" schedulerid="4" kpid="2492" status="suspended" spid="53" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2013-07-02t18:03:42.260" lastbatchcompleted="2013-07-02t18:03:42.260" clientapp=".net sqlclient data provider" hostname="xxx" hostpid="2148" loginname="xxx" isolationlevel="serializable (4)" xactid="21923023" currentdb="5" locktimeout="4294967295" clientoption1="671088672" clientoption2="128056"> ... </process> </process-list> <resource-list> <keylock hobtid="72057594042646528" dbid="5" objectname="dbo.sometable" indexname="pk_sometable" id="lock83d99200" mode="ranges-u" associatedobjectid="72057594042646528"> <owner-list> <owner id="processc4d048" mode="ranges-u"/> </owner-list> <waiter-list> <waiter id="processc19dc8" mode="ranges-u" requesttype="wait"/> </waiter-list> </keylock> <keylock hobtid="72057594042646528" dbid="5" objectname="dbo.sometable" indexname="pk_sometable" id="lock89b52900" mode="u" associatedobjectid="72057594042646528"> <owner-list> <owner id="processc19dc8" mode="u"/> </owner-list> <waiter-list> <waiter id="processc4d048" mode="ranges-u" requesttype="wait"/> </waiter-list> </keylock> </resource-list> </deadlock> </deadlock-list>
so looks first process owns resource mode=u
, , second owns same resource mode=ranges-u
.
how possible if these 2 modes not compatible each other (according compatibility matrix)?
Comments
Post a Comment