Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Deadlock with Partition Lock

$
0
0

Hi, We are facing deadlocks regularly in our production server. We suspect this could be Partition lock. Can someone please help on this.

Environment Info : Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)   Jun 28 2012 08:36:30   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1);

8 nodes, each has 6 schedulers.

Below is the XML of deadlock graph. Please help on this.

<deadlock-list>
 <deadlock victim="process1c6274c8">
  <process-list>
   <process id="process1c6274c8" taskpriority="0" logused="0" waitresource="OBJECT: 11:1417212249:42 " waittime="2872" ownerId="3370903619" transactionname="Lookup" lasttranstarted="2014-04-17T03:59:07.567" XDES="0xae9d6b9d0" lockMode="Sch-S" schedulerid="46" kpid="8144" status="suspended" spid="75" sbid="0" ecid="0" priority="0" trancount="0" lastbatchstarted="2014-04-17T03:59:06.263" lastbatchcompleted="2014-04-17T03:59:06.263" hostname="10.53.163.40" hostpid="0" loginname="Raptor_User" isolationlevel="read committed (2)" xactid="3370903306" currentdb="11" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056">
    <executionStack>
     <frame procname="lopositionSelect" line="94" stmtstart="5276" stmtend="17610" sqlhandle="0x03000b0046ca145ad5274f0170a200000100000000000000">
select
    aid.accountid,
    m.acuniqueid,
    s.seuniqueid,
    --p.side,
    p.units,
    --p.netcost,
    --p.purchasedate,
    --p.unitcost,
    /*CASE
    WHEN ((s.type = 2) and (dbo.getFactor(p.seuniqueid, getDate(), a.pricesource) is not null) and (dbo.getFactor(p.seuniqueid, getDate(), a.pricesource) &lt;&gt; 0)) THEN
    (p.units * r.lastprice * s.priceadjustment * dbo.getFactor(p.seuniqueid, getDate(), a.pricesource))
    ELSE
    (p.units * r.lastprice * s.priceadjustment)
    END*/
    cast(0.0 as float) as marketvalue,
    /*CASE
    WHEN ((s.type = 2) and (dbo.getFactor(p.seuniqueid, getDate(), a.pricesource) is not null) and (dbo.getFactor(p.seuniqueid, getDate(), a.pricesource) &lt;&gt; 0)) THEN
    dbo.FxRatesConvert((p.units * r.lastprice * s.priceadjustment * dbo.getFactor(p.seuniqueid, getDate(), a.pricesource)), a.cuuniqueid, @selectedCuuniqueid, getdate())
    ELSE
    dbo.FxRatesConvert((p.units * r.lastprice * s.priceadjustment), a.cuuniqueid, @selectedCuuniqueid, getdate())
    END*/
    cast(0.0 as float) as selectedmarketvalue,
    s.de     </frame>
    </executionStack>
    <inputbuf>
Proc [Database Id = 11 Object Id = 1511311942]    </inputbuf>
   </process>
   <process id="process14626988" taskpriority="0" logused="20068" waitresource="OBJECT: 11:1417212249:45 " waittime="3100" ownerId="3370903605" transactionname="DROPOBJ" lasttranstarted="2014-04-17T03:59:07.337" XDES="0x2421adc3b0" lockMode="Sch-M" schedulerid="22" kpid="11808" status="suspended" spid="63" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-04-17T03:57:02.730" lastbatchcompleted="2014-04-17T03:57:02.730" clientapp="OSQL-32" hostname="WTPCPCL9LWSQL10" hostpid="7324" loginname="LKWD\svc_sql2k" isolationlevel="read committed (2)" xactid="3370903605" currentdb="11" lockTimeout="4294967295" clientoption1="673185824" clientoption2="128056">
    <executionStack>
     <frame procname="adhoc" line="1" sqlhandle="0x01000b0056a4d21fa09bf54b2c0000000000000000000000">
drop table __LoadTable_openrec_DVPCBT     </frame>
     <frame procname="mssqlsystemresource.sys.sp_executesql" line="1" sqlhandle="0x0400ff7fbe80662601000000000000000000000000000000">
sp_executesql     </frame>
     <frame procname="LoadTable" line="161" stmtstart="16666" stmtend="16718" sqlhandle="0x03000b0070d16a45c0884f0170a200000100000000000000">
exec sp_executesql @sql     </frame>
     <frame procname=TranInstFromst" line="913" stmtstart="101708" stmtend="102154" sqlhandle="0x03000b00133ff063336b500170a200000100000000000000">
exec @ret = LoadTable @firmname, @asofdate, @sessionid, @tablename, @tseq, @src_cols, @dst_cols, @where_clause, @joinprice, @seed, @increment, @tranmapval, @tranmapval2, @src_cols_U2, @where_clause_U2, @timing     </frame>
     <frame procname="ProdUpdate" line="620" stmtstart="63878" stmtend="64002" sqlhandle="0x03000700b9f436439e694e0170a200000100000000000000">
exec @ret = @sql @firmname, @sessionid, @timing = @timing     </frame>
     <frame procname="Bk_PrdUpdate" line="53" stmtstart="3648" stmtend="3842" sqlhandle="0x03000700f73df17a642b4e0170a200000100000000000000">
unknown     </frame>
     <frame procname="adhoc" line="5" stmtstart="336" stmtend="510" sqlhandle="0x02000000e3dae237de79bf7ee4b4d5a3bc9a49be40cfec37">
exec @ret = bk_prdupdate &apos;Lwood&apos;, &apos;DVPCBT&apos;, @srctbl = &apos;bkDVPCBT&apos;;     </frame>
    </executionStack>
    <inputbuf>
-- jobuid = 429300
set nocount on;
declare @ret int;
update XYZ set spid = @@spid, execstart = getdate() where ABC= 429300;
exec @ret = PRC &apos;Lwood&apos;, &apos;DVPCBT&apos;, @srctbl = &apos;bookkeepingDVPCBT&apos;;
update Batchset execfinish = getdate(), resultcode = @ret where ebsuniqueid = 429300;
    </inputbuf>
   </process>
  </process-list>
  <resource-list>
   <objectlock lockPartition="42" objid="1417212249" subresource="FULL" dbid="11" objectname="SECMASTER" id="lock207eba9400" mode="Sch-M" associatedObjectId="1417212249">
    <owner-list>
     <owner id="process14626988" mode="Sch-M"/>
    </owner-list>
    <waiter-list>
     <waiter id="process1c6274c8" mode="Sch-S" requestType="wait"/>
    </waiter-list>
   </objectlock>
   <objectlock lockPartition="45" objid="1417212249" subresource="FULL" dbid="11" objectname="SECMASTER" id="lockaf48fea80" mode="Sch-S" associatedObjectId="1417212249">
    <owner-list>
     <owner id="process1c6274c8" mode="Sch-S"/>
    </owner-list>
    <waiter-list>
     <waiter id="process14626988" mode="Sch-M" requestType="wait"/>
    </waiter-list>
   </objectlock>
  </resource-list>
 </deadlock>
</deadlock-list>

Thanks for your Help!!


Viewing all articles
Browse latest Browse all 23857

Trending Articles