Я понимаю, что этот пост довольно старый, но у меня такая ситуация. пожалуйста, найдите информацию о взаимоблокировке ниже и ссылки на соответствующие таблицы: http://pastebin.com/cxqtGMgh и http://pastebin.com/5E8kw6Kw
вам нужно будет отклонить ссылки внешнего ключа на все таблицы, которые я не включил, и, вероятно, создать некоторые тестовые данные. ссылка на страницу PAGE: 16:8:5031979
преобразуется в таблицу profmaster
согласно приведенному ниже коду. обратите внимание, что я использовал Metadata ObjectId
вместо m_objId
из вывода, так как последний не разрешается.
DBCC TRACEON(3604)
DBCC PAGE(16,8,5031979,1)
DBCC TRACEOFF(3604)
select name from sys.tables where object_id = 1889441805
Вот вывод отчета о разрешении страницы: http://pastebin.com/HfrVp2nP - и, пожалуйста, обратите внимание, что я использую SQL Server 2008 R2 (SP1) X64
Буду благодарен за любые указания относительно того, как решить проблему.
- е
<deadlock-list>
<deadlock victim="process53f9f2bc8">
<process-list>
<process id="process53f9f2bc8" taskpriority="0" logused="4712" waitresource="KEY: 16:72057678434598912 (a60c363e20e5)" waittime="571706" ownerId="93354998" transactionname="user_transaction" lasttranstarted="2013-11-19T15:39:31.203" XDES="0x80011730" lockMode="U" schedulerid="2" kpid="2064" status="suspended" spid="61" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2013-11-19T15:39:31.263" lastbatchcompleted="2013-11-19T15:39:31.260" clientapp="3E WebUI" hostname="LA-BAT-26-WAPI" hostpid="2728" loginname="sa" isolationlevel="read committed (2)" xactid="93354998" currentdb="16" lockTimeout="4294967295" clientoption1="671096864" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="140" sqlhandle="0x02000000d1e0f407f28e46e45feec1ce34fc8f3e09dcb3c5">
update n0t0 set ProfMaster = @0 , MatrixTaxCode = null , PrevProfMaster = @1 , LastProcItemID = @2 , TimeStamp = GETDATE ( ) from Timecard as n0t0 where ( ( ( ( n0t0 . WorkDate ) < = ( @3 ) ) and ( ( ( n0t0 . IsActive ) = ( @4 ) ) and ( ( n0t0 . IsNB ) = ( @5 ) ) ) ) and ( ( ( ( ( n0t0 . ProfMaster ) is null ) and ( ( n0t0 . InvMaster ) is null ) ) and ( ( n0t0 . WIPRemoveDate ) is null ) ) and ( ( n0t0 . CurrProcItemID ) is null ) ) ) and ( ( n0t0 . Matter ) in ( select n1t1 . Matter from ProfMatter as n1t1 where ( n1t1 . ProfMaster ) = ( @6 ) ) ) </frame>
<frame procname="adhoc" line="1" sqlhandle="0x0200000095131921232b4d814cc188595c176663442618b6">
UPDATE n0t0 SET ProfMaster = 252516,MatrixTaxCode = NULL,PrevProfMaster = 252516,LastProcItemID = '939f3291-10a7-4704-885e-9021b2a39f15',TimeStamp = GETDATE() FROM Timecard AS n0t0 WHERE ( ( ( ( n0t0.WorkDate ) <= ( '11/04/2013 00:00:00') ) AND ( ( ( n0t0.IsActive ) = ( 1 ) ) AND ( ( n0t0.IsNB ) = ( 0 ) ) ) ) AND ( ( ( ( ( n0t0.ProfMaster ) IS NULL ) AND ( ( n0t0.InvMaster ) IS NULL ) ) AND ( ( n0t0.WIPRemoveDate ) IS NULL ) ) AND ( ( n0t0.CurrProcItemID ) IS NULL ) ) ) AND ( ( n0t0.Matter ) IN ( SELECT n1t1.Matter FROM ProfMatter AS n1t1 WHERE ( n1t1.ProfMaster ) = ( 252516 ) ) )/**0x2C621659**/ </frame>
</executionStack>
<inputbuf>
UPDATE n0t0 SET ProfMaster = 252516,MatrixTaxCode = NULL,PrevProfMaster = 252516,LastProcItemID = '939f3291-10a7-4704-885e-9021b2a39f15',TimeStamp = GETDATE() FROM Timecard AS n0t0 WHERE ( ( ( ( n0t0.WorkDate ) <= ( '11/04/2013 00:00:00') ) AND ( ( ( n0t0.IsActive ) = ( 1 ) ) AND ( ( n0t0.IsNB ) = ( 0 ) ) ) ) AND ( ( ( ( ( n0t0.ProfMaster ) IS NULL ) AND ( ( n0t0.InvMaster ) IS NULL ) ) AND ( ( n0t0.WIPRemoveDate ) IS NULL ) ) AND ( ( n0t0.CurrProcItemID ) IS NULL ) ) ) AND ( ( n0t0.Matter ) IN ( SELECT n1t1.Matter FROM ProfMatter AS n1t1 WHERE ( n1t1.ProfMaster ) = ( 252516 ) ) )/**0x2C621659**/ </inputbuf>
</process>
<process id="process50b54c8" taskpriority="0" logused="43622588" waitresource="PAGE: 16:8:5031979" waittime="1575" ownerId="87921480" transactionname="user_transaction" lasttranstarted="2013-11-19T14:26:29.400" XDES="0x569d39950" lockMode="U" schedulerid="9" kpid="1304" status="suspended" spid="60" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2013-11-19T15:49:01.277" lastbatchcompleted="2013-11-19T15:49:01.277" clientapp="3E WebUI" hostname="LA-BAT-27-WAPI" hostpid="2628" loginname="sa" isolationlevel="read committed (2)" xactid="87921480" currentdb="16" lockTimeout="4294967295" clientoption1="671096864" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="86" sqlhandle="0x020000006014e71626ea61a3e74df841cee6a59043438dc8">
update n0t0 set ProfStatus = @0 , LastProcItemID = @1 , TimeStamp = GETDATE ( ) from ProfMaster as n0t0 join #TempMatterProforma as z0 on ( ( n0t0 . ProfIndex ) = ( z0 . ProfIndex ) ) and ( ( z0 . IsNewProforma ) = ( @2 ) ) </frame>
<frame procname="adhoc" line="1" sqlhandle="0x020000004d41a316b62a8171bbf8979051631fdc480c754b">
UPDATE n0t0 SET ProfStatus = N'P' ,LastProcItemID = 'd7eff077-6f52-435f-906a-6fc8f2ee929a',TimeStamp = GETDATE() FROM ProfMaster AS n0t0 JOIN #TempMatterProforma AS z0 ON ( ( n0t0.ProfIndex ) = ( z0.ProfIndex ) ) AND ( ( z0.IsNewProforma ) = ( 0 ) )/**0xA8DF8735**/ </frame>
</executionStack>
<inputbuf>
UPDATE n0t0 SET ProfStatus = N'P' ,LastProcItemID = 'd7eff077-6f52-435f-906a-6fc8f2ee929a',TimeStamp = GETDATE() FROM ProfMaster AS n0t0 JOIN #TempMatterProforma AS z0 ON ( ( n0t0.ProfIndex ) = ( z0.ProfIndex ) ) AND ( ( z0.IsNewProforma ) = ( 0 ) )/**0xA8DF8735**/ </inputbuf>
</process>
</process-list>
<resource-list>
<keylock hobtid="72057678434598912" dbid="16" objectname="TE_3E_BAT27B.dbo.Timecard" indexname="IDX__TimeIndex__2F97CBE5" id="lock1ffcaf600" mode="X" associatedObjectId="72057678434598912">
<owner-list>
<owner id="process50b54c8" mode="X"/>
</owner-list>
<waiter-list>
<waiter id="process53f9f2bc8" mode="U" requestType="wait"/>
</waiter-list>
</keylock>
<pagelock fileid="8" pageid="5031979" dbid="16" objectname="TE_3E_BAT27B.dbo.ProfMaster" id="lock3bf068600" mode="IX" associatedObjectId="72057678315388928">
<owner-list>
<owner id="process53f9f2bc8" mode="IX"/>
</owner-list>
<waiter-list>
<waiter id="process50b54c8" mode="U" requestType="wait"/>
</waiter-list>
</pagelock>
</resource-list>
</deadlock>
</deadlock-list>