Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15264

Parallelism deadlock on sql 2012 ent (not sp1)

$
0
0

Server has 80 cores (4 phsical intel), max degree of parallelism (sp_configure) set to 5.

We got this error on a merge statement, the target is a table which has 3300+ partitions, row compression , has 406,332,191 ROWS, total size of 59,698 MB

What can be solution to this (holdlock on merge maybe or maxdop 1)? and what could be causing this?

Thank you

Below is the deadlock graph and merge statement

<deadlock-list><deadlock victim="processa962db2cf8"><process-list><process id="processa962db2cf8" taskpriority="0" logused="10000" waittime="108" schedulerid="58" kpid="27492" status="suspended" spid="74" sbid="0" ecid="2" priority="0" trancount="0" lastbatchstarted="2012-12-25T18:38:39.017" lastbatchcompleted="2012-12-25T18:38:39.017" lastattention="1900-01-01T00:00:00.017" clientapp="VTU_20121225_183837" hostname="FACLSNA01VAPP34" hostpid="62696" isolationlevel="read committed (2)" xactid="1861159942" currentdb="13" lockTimeout="4294967295" clientoption1="673316896" clientoption2="128056" databaseName="Diablo"><executionStack><frame procname="unknown" line="4567" stmtstart="786950" stmtend="803520" sqlhandle="0x03000d00f1e836612b2586002aa1000001000000000000000000000000000000000000000000000000000000">
unknown     </frame><frame procname="unknown" line="1" sqlhandle="0x01000d00e3032507409d3bc8b700000000000000000000000000000000000000000000000000000000000000">
unknown     </frame></executionStack><inputbuf>
EXEC aTrans.VTUProcess @RunType_Annual_Catchup_Daily = 3 /*Daily*/</inputbuf></process><process id="process1e86a10b868" taskpriority="0" logused="10000" waittime="108" schedulerid="59" kpid="26832" status="suspended" spid="74" sbid="0" ecid="3" priority="0" trancount="0" lastbatchstarted="2012-12-25T18:38:39.017" lastbatchcompleted="2012-12-25T18:38:39.017" lastattention="1900-01-01T00:00:00.017" clientapp="VTU_20121225_183837" hostname="FACLSNA01VAPP34" hostpid="62696" isolationlevel="read committed (2)" xactid="1861159942" currentdb="13" lockTimeout="4294967295" clientoption1="673316896" clientoption2="128056" databaseName="Diablo"><executionStack><frame procname="unknown" line="4567" stmtstart="786950" stmtend="803520" sqlhandle="0x03000d00f1e836612b2586002aa1000001000000000000000000000000000000000000000000000000000000">
unknown     </frame><frame procname="unknown" line="1" sqlhandle="0x01000d00e3032507409d3bc8b700000000000000000000000000000000000000000000000000000000000000">
unknown     </frame></executionStack><inputbuf>
EXEC aTrans.VTUProcess @RunType_Annual_Catchup_Daily = 3 /*Daily*/</inputbuf></process><process id="process5fd3f52188" taskpriority="0" logused="10000" waittime="108" schedulerid="66" kpid="22948" status="suspended" spid="74" sbid="0" ecid="4" priority="0" trancount="0" lastbatchstarted="2012-12-25T18:38:39.017" lastbatchcompleted="2012-12-25T18:38:39.017" lastattention="1900-01-01T00:00:00.017" clientapp="VTU_20121225_183837" hostname="FACLSNA01VAPP34" hostpid="62696" isolationlevel="read committed (2)" xactid="1861159942" currentdb="13" lockTimeout="4294967295" clientoption1="673316896" clientoption2="128056" databaseName="Diablo"><executionStack><frame procname="unknown" line="4567" stmtstart="786950" stmtend="803520" sqlhandle="0x03000d00f1e836612b2586002aa1000001000000000000000000000000000000000000000000000000000000">
unknown     </frame><frame procname="unknown" line="1" sqlhandle="0x01000d00e3032507409d3bc8b700000000000000000000000000000000000000000000000000000000000000">
unknown     </frame></executionStack><inputbuf>
EXEC aTrans.VTUProcess @RunType_Annual_Catchup_Daily = 3 /*Daily*/</inputbuf></process><process id="process1e6f717ccf8" taskpriority="0" logused="10000" waittime="108" schedulerid="67" kpid="22800" status="suspended" spid="74" sbid="0" ecid="5" priority="0" trancount="0" lastbatchstarted="2012-12-25T18:38:39.017" lastbatchcompleted="2012-12-25T18:38:39.017" lastattention="1900-01-01T00:00:00.017" clientapp="VTU_20121225_183837" hostname="FACLSNA01VAPP34" hostpid="62696" isolationlevel="read committed (2)" xactid="1861159942" currentdb="13" lockTimeout="4294967295" clientoption1="673316896" clientoption2="128056" databaseName="Diablo"><executionStack><frame procname="unknown" line="4567" stmtstart="786950" stmtend="803520" sqlhandle="0x03000d00f1e836612b2586002aa1000001000000000000000000000000000000000000000000000000000000">
unknown     </frame><frame procname="unknown" line="1" sqlhandle="0x01000d00e3032507409d3bc8b700000000000000000000000000000000000000000000000000000000000000">
unknown     </frame></executionStack><inputbuf>
EXEC aTrans.VTUProcess @RunType_Annual_Catchup_Daily = 3 /*Daily*/</inputbuf></process><process id="processe6cc449498" taskpriority="0" logused="10000" waittime="109" schedulerid="57" kpid="27580" status="suspended" spid="74" sbid="0" ecid="1" priority="0" trancount="0" lastbatchstarted="2012-12-25T18:38:39.017" lastbatchcompleted="2012-12-25T18:38:39.017" lastattention="1900-01-01T00:00:00.017" clientapp="VTU_20121225_183837" hostname="FACLSNA01VAPP34" hostpid="62696" isolationlevel="read committed (2)" xactid="1861159942" currentdb="13" lockTimeout="4294967295" clientoption1="673316896" clientoption2="128056" databaseName="Diablo"><executionStack><frame procname="unknown" line="4567" stmtstart="786950" stmtend="803520" sqlhandle="0x03000d00f1e836612b2586002aa1000001000000000000000000000000000000000000000000000000000000">
unknown     </frame><frame procname="unknown" line="1" sqlhandle="0x01000d00e3032507409d3bc8b700000000000000000000000000000000000000000000000000000000000000">
unknown     </frame></executionStack><inputbuf>
EXEC aTrans.VTUProcess @RunType_Annual_Catchup_Daily = 3 /*Daily*/</inputbuf></process><process id="process9011486cf8" waittime="103" schedulerid="57" kpid="0" /></process-list><resource-list><exchangeEvent id="Port100f50dfc00" WaitType="e_waitPortOpen" nodeId="24"><owner-list><owner id="process1e86a10b868" /></owner-list><waiter-list><waiter id="processa962db2cf8" /></waiter-list></exchangeEvent><exchangeEvent id="Port100f50dfc00" WaitType="e_waitPortOpen" nodeId="24"><owner-list><owner id="process5fd3f52188" /></owner-list><waiter-list><waiter id="process1e86a10b868" /></waiter-list></exchangeEvent><exchangeEvent id="Port100f50dfc00" WaitType="e_waitPortOpen" nodeId="24"><owner-list><owner id="process1e6f717ccf8" /></owner-list><waiter-list><waiter id="process5fd3f52188" /></waiter-list></exchangeEvent><exchangeEvent id="Port100f50dfc00" WaitType="e_waitPortOpen" nodeId="24"><owner-list><owner id="process9011486cf8" /></owner-list><waiter-list><waiter id="process1e6f717ccf8" /></waiter-list></exchangeEvent><exchangeEvent id="Port100f50dfc00" WaitType="e_waitPortOpen" nodeId="24"><owner-list><owner id="processa962db2cf8" /></owner-list><waiter-list><waiter id="processe6cc449498" /></waiter-list></exchangeEvent><threadpool id="scheduler100fe5e0040"><owner-list><owner id="processe6cc449498" /></owner-list><waiter-list><waiter id="process9011486cf8" /></waiter-list></threadpool></resource-list></deadlock></deadlock-list>

        WITH    RetPropertyLegalPartyName
                  AS ( SELECT   #VTUOutput.CntyCd
                              , #VTUOutput.PclId
                              , #VTUOutput.PclSeqNbr
                              , CAST(2 AS TINYINT) AS NameTypId
                              , #VTUOutput.Sequence1 AS NameSeq
                              , #VTUOutput.PropertyLegalPartyName_AKAName AS AKAName
                              , #VTUOutput.PropertyLegalPartyName_AKANameTypCd AS AKANameTypCd
                              , #VTUOutput.PropertyLegalPartyName_CareOfName AS CareOfName
                              , #VTUOutput.PropertyLegalPartyName_CorpInd AS CorpInd
                              , #VTUOutput.PropertyLegalPartyName_DBAName AS DBAName
                              , #VTUOutput.PropertyLegalPartyName_EtConInd AS EtConInd
                              , #VTUOutput.PropertyLegalPartyName_EtUxInd AS EtUxInd
                              , #VTUOutput.PropertyLegalPartyName_EtvirInd AS EtvirInd
                              , #VTUOutput.PropertyLegalPartyName_FullName AS FullName
                              , #VTUOutput.PropertyLegalPartyName_OwnrShipRightsCd AS OwnrShipRightsCd
                              , #VTUOutput.PropertyLegalPartyName_PCTOwnrship AS PCTOwnrship
                              , #VTUOutput.PropertyLegalPartyName_RelTypCd AS RelTypCd
                              , @UpdateID AS UpdateID
                              , @UpdateTimestamp AS UpdateTimestamp
                       FROM     #VTUOutput
                       WHERE    #VTUOutput.PropertyLegalPartyName_NameSeq > 0
                     ) ,
                t AS ( SELECT   *
                       FROM     tTax.PropertyLegalPartyName t WITH ( FORCESEEK, INDEX = 1 )
                       WHERE    EXISTS ( SELECT 1
                                         FROM   @VtuInputKeys v
                                         WHERE  v.CntyCd = t.CntyCd
                                                AND v.PclId = t.PclId
                                                AND v.PclSeqNbr = t.PclSeqNbr )
                                AND NameTypId = 2
                     )
            MERGE t
                USING RetPropertyLegalPartyName AS s
                ON t.CntyCd = s.CntyCd
                    AND t.PclId = s.PclId
                    AND t.PclSeqNbr = s.PclSeqNbr
                    AND t.NameTypId = s.NameTypId
                    AND t.NameSeq = s.NameSeq
                WHEN MATCHED AND t.AKAName IS NULL
                    AND s.AKAName IS NOT NULL
                    OR t.AKAName IS NOT NULL
                    AND s.AKAName IS NULL
                    OR t.AKAName <> s.AKAName
                    OR t.AKANameTypCd IS NULL
                    AND s.AKANameTypCd IS NOT NULL
                    OR t.AKANameTypCd IS NOT NULL
                    AND s.AKANameTypCd IS NULL
                    OR t.AKANameTypCd <> s.AKANameTypCd
                    OR t.CareOfName IS NULL
                    AND s.CareOfName IS NOT NULL
                    OR t.CareOfName IS NOT NULL
                    AND s.CareOfName IS NULL
                    OR t.CareOfName <> s.CareOfName
                    OR t.CorpInd IS NULL
                    AND s.CorpInd IS NOT NULL
                    OR t.CorpInd IS NOT NULL
                    AND s.CorpInd IS NULL
                    OR t.CorpInd <> s.CorpInd
                    OR t.DBAName IS NULL
                    AND s.DBAName IS NOT NULL
                    OR t.DBAName IS NOT NULL
                    AND s.DBAName IS NULL
                    OR t.DBAName <> s.DBAName
                    OR t.EtConInd IS NULL
                    AND s.EtConInd IS NOT NULL
                    OR t.EtConInd IS NOT NULL
                    AND s.EtConInd IS NULL
                    OR t.EtConInd <> s.EtConInd
                    OR t.EtUxInd IS NULL
                    AND s.EtUxInd IS NOT NULL
                    OR t.EtUxInd IS NOT NULL
                    AND s.EtUxInd IS NULL
                    OR t.EtUxInd <> s.EtUxInd
                    OR t.EtvirInd IS NULL
                    AND s.EtvirInd IS NOT NULL
                    OR t.EtvirInd IS NOT NULL
                    AND s.EtvirInd IS NULL
                    OR t.EtvirInd <> s.EtvirInd
                    OR t.FullName IS NULL
                    AND s.FullName IS NOT NULL
                    OR t.FullName IS NOT NULL
                    AND s.FullName IS NULL
                    OR t.FullName <> s.FullName
                    OR t.OwnrShipRightsCd IS NULL
                    AND s.OwnrShipRightsCd IS NOT NULL
                    OR t.OwnrShipRightsCd IS NOT NULL
                    AND s.OwnrShipRightsCd IS NULL
                    OR t.OwnrShipRightsCd <> s.OwnrShipRightsCd
                    OR t.PCTOwnrship IS NULL
                    AND s.PCTOwnrship IS NOT NULL
                    OR t.PCTOwnrship IS NOT NULL
                    AND s.PCTOwnrship IS NULL
                    OR t.PCTOwnrship <> s.PCTOwnrship
                    OR t.RelTypCd IS NULL
                    AND s.RelTypCd IS NOT NULL
                    OR t.RelTypCd IS NOT NULL
                    AND s.RelTypCd IS NULL
                    OR t.RelTypCd <> s.RelTypCd
                    THEN UPDATE
                         SET    t.AKAName = s.AKAName
                              , t.AKANameTypCd = s.AKANameTypCd
                              , t.CareOfName = s.CareOfName
                              , t.CorpInd = s.CorpInd
                              , t.DBAName = s.DBAName
                              , t.EtConInd = s.EtConInd
                              , t.EtUxInd = s.EtUxInd
                              , t.EtvirInd = s.EtvirInd
                              , t.FullName = s.FullName
                              , t.OwnrShipRightsCd = s.OwnrShipRightsCd
                              , t.PCTOwnrship = s.PCTOwnrship
                              , t.RelTypCd = s.RelTypCd
                              , t.UpdateID = s.UpdateID
                              , t.UpdateTimestamp = s.UpdateTimestamp
                WHEN NOT MATCHED 
                    THEN INSERT (
                                  CntyCd
                                , PclId
                                , PclSeqNbr
                                , NameTypId
                                , NameSeq
                                , AKAName
                                , AKANameTypCd
                                , CareOfName
                                , CorpInd
                                , DBAName
                                , EtConInd
                                , EtUxInd
                                , EtvirInd
                                , FullName
                                , OwnrShipRightsCd
                                , PCTOwnrship
                                , RelTypCd
                                , UpdateID
                                , UpdateTimestamp
                                )
                         VALUES ( s.CntyCd
                                , s.PclId
                                , s.PclSeqNbr
                                , s.NameTypId
                                , s.NameSeq
                                , s.AKAName
                                , s.AKANameTypCd
                                , s.CareOfName
                                , s.CorpInd
                                , s.DBAName
                                , s.EtConInd
                                , s.EtUxInd
                                , s.EtvirInd
                                , s.FullName
                                , s.OwnrShipRightsCd
                                , s.PCTOwnrship
                                , s.RelTypCd
                                , s.UpdateID
                                , s.UpdateTimestamp
                                )
                WHEN NOT MATCHED BY SOURCE 
                    THEN     DELETE
                OPTION
                    ( RECOMPILE ) ;


Gokhan Varol


Viewing all articles
Browse latest Browse all 15264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>