「SalesParmSubTableでレコードを選択できません。 デッドロック.1人以上のユーザーが同時にテーブル全体またはその一部をロックしています。並列バッチ処理でのデッドロックの問題
私はデッドロックトレースを取得するためにSQLプロファイラを使用しました。誰かがそれを是正するために助けてもらえますか?私たちは単にデッドロックが発生している知ることでデッドロックの問題を解決することができるとは思わない
<?xml version="1.0" encoding="UTF-8"?>
<deadlock-list>
<deadlock victim="process58d048">
<process-list>
<process id="process58d048" taskpriority="0" logused="5784" waitresource="PAGE: 16:1:16714223" waittime="1587" ownerId="207752233" transactionname="user_transaction" lasttranstarted="2016-05-07T07:58:32.533" XDES="0x52376d950" lockMode="S" schedulerid="4" kpid="10860" status="suspended" spid="159" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2016-05-07T07:58:32.553" lastbatchcompleted="2016-05-07T07:58:32.553" clientapp="Microsoft Dynamics AX" hostname="*********" hostpid="19816" loginname="************" isolationlevel="read committed (2)" xactid="207752233" currentdb="16" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="100" sqlhandle="0x02000000d3d2cf1665ba9e17ee49d6dd9bc2fbf295ad7168">SELECT A.DEL_SALESID,A.SALESNAME,A.PARMID,A.ORIGSALESID,A.TABLEREFID,A.DEL_ORIGTABLEREFID,A.JOURNALREFTABLEID,A.JOURNALREFRECID,A.SUBID,A.CREATEDDATETIME,A.CREATEDBY,A.RECVERSION,A.RECID FROM SALESPARMSUBTABLE A WHERE (([email protected]) AND ([email protected])) AND NOT EXISTS (SELECT 'x' FROM SALESPARMLINE B WHERE (([email protected]) AND (((B.PARMID=A.PARMID) AND (B.TABLEREFID=A.TABLEREFID)) AND (B.ORIGSALESID=A.ORIGSALESID)))) ORDER BY A.DATAAREAID,A.PARMID,A.DEL_SALESID</frame>
<frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">unknown</frame>
</executionStack>
<inputbuf>(@P1 nvarchar(5),@P2 nvarchar(21),@P3 nvarchar(5))SELECT A.DEL_SALESID,A.SALESNAME,A.PARMID,A.ORIGSALESID,A.TABLEREFID,A.DEL_ORIGTABLEREFID,A.JOURNALREFTABLEID,A.JOURNALREFRECID,A.SUBID,A.CREATEDDATETIME,A.CREATEDBY,A.RECVERSION,A.RECID FROM SALESPARMSUBTABLE A WHERE (([email protected]) AND ([email protected])) AND NOT EXISTS (SELECT 'x' FROM SALESPARMLINE B WHERE (([email protected]) AND (((B.PARMID=A.PARMID) AND (B.TABLEREFID=A.TABLEREFID)) AND (B.ORIGSALESID=A.ORIGSALESID)))) ORDER BY A.DATAAREAID,A.PARMID,A.DEL_SALESID</inputbuf>
</process>
<process id="process572988" taskpriority="0" logused="5800" waitresource="PAGE: 16:1:16714223" waittime="1576" ownerId="207752211" transactionname="user_transaction" lasttranstarted="2016-05-07T07:58:32.530" XDES="0x865e1950" lockMode="S" schedulerid="3" kpid="21628" status="suspended" spid="154" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2016-05-07T07:58:32.563" lastbatchcompleted="2016-05-07T07:58:32.560" clientapp="Microsoft Dynamics AX" hostname="*********" hostpid="19816" loginname="*********" isolationlevel="read committed (2)" xactid="207752211" currentdb="16" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="100" sqlhandle="0x02000000d3d2cf1665ba9e17ee49d6dd9bc2fbf295ad7168">SELECT A.DEL_SALESID,A.SALESNAME,A.PARMID,A.ORIGSALESID,A.TABLEREFID,A.DEL_ORIGTABLEREFID,A.JOURNALREFTABLEID,A.JOURNALREFRECID,A.SUBID,A.CREATEDDATETIME,A.CREATEDBY,A.RECVERSION,A.RECID FROM SALESPARMSUBTABLE A WHERE (([email protected]) AND ([email protected])) AND NOT EXISTS (SELECT 'x' FROM SALESPARMLINE B WHERE (([email protected]) AND (((B.PARMID=A.PARMID) AND (B.TABLEREFID=A.TABLEREFID)) AND (B.ORIGSALESID=A.ORIGSALESID)))) ORDER BY A.DATAAREAID,A.PARMID,A.DEL_SALESID</frame>
<frame procname="unknown" line="1" sqlhandle="0x000000000000000000000000000000000000000000000000">unknown</frame>
</executionStack>
<inputbuf>(@P1 nvarchar(5),@P2 nvarchar(21),@P3 nvarchar(5))SELECT A.DEL_SALESID,A.SALESNAME,A.PARMID,A.ORIGSALESID,A.TABLEREFID,A.DEL_ORIGTABLEREFID,A.JOURNALREFTABLEID,A.JOURNALREFRECID,A.SUBID,A.CREATEDDATETIME,A.CREATEDBY,A.RECVERSION,A.RECID FROM SALESPARMSUBTABLE A WHERE (([email protected]) AND ([email protected])) AND NOT EXISTS (SELECT 'x' FROM SALESPARMLINE B WHERE (([email protected]) AND (((B.PARMID=A.PARMID) AND (B.TABLEREFID=A.TABLEREFID)) AND (B.ORIGSALESID=A.ORIGSALESID)))) ORDER BY A.DATAAREAID,A.PARMID,A.DEL_SALESID</inputbuf>
</process>
</process-list>
<resource-list>
<pagelock fileid="1" pageid="16714223" dbid="16" objectname="AX2009_****.dbo.SALESPARMLINE" id="lock562bdb480" mode="IX" associatedObjectId="72057635944464384">
<owner-list>
<owner id="process572988" mode="IX" />
</owner-list>
<waiter-list>
<waiter id="process58d048" mode="S" requestType="convert" />
</waiter-list>
</pagelock>
<pagelock fileid="1" pageid="16714223" dbid="16" objectname="AX2009_****.dbo.SALESPARMLINE" id="lock562bdb480" mode="IX" associatedObjectId="72057635944464384">
<owner-list>
<owner id="process58d048" mode="IX" />
</owner-list>
<waiter-list>
<waiter id="process572988" mode="S" requestType="convert" />
</waiter-list>
</pagelock>
</resource-list>
</deadlock>
</deadlock-list>
これは、言及したSELECTは、更新が起こるしようとしているトランザクションの一部であることを示しているようです。同じ取引で実際に(潜在的な)更新があるかどうか確認できますか? – trincot