Thursday, March 29, 2012

Deadlocks Information.

When a deadlock occurs, the system dumps a bunch of diagnostics
information into its error log and ends up looking like the excerpt
below. Does an application exist anywhere that parses this stuff and
tells me exactly what tables/indexes/etc... were involved in the deadlock?
Deadlock encountered ... Printing deadlock information
Wait-for graph
Node:1
KEY: 13:1171587312:1 (25009a75c3be) CleanCnt:1 Mode: X Flags: 0x0
Grant List 3::
Owner:0x45bb0480 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:58
ECID:0
SPID: 58 ECID: 0 Statement Type: UPDATE Line #: 596
Input Buf: RPC Event: pr_Sproc1;1
Requested By:
ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
Value:0x6847aac0 Cost:(0/0)
Node:2
TAB: 13:1203587426 [] CleanCnt:1 Mode: S Flags: 0x0
Grant List 3::
Owner:0x684935a0 Mode: S Flg:0x0 Ref:1 Life:00000001 SPID:53
ECID:0
SPID: 53 ECID: 0 Statement Type: SELECT INTO Line #: 579
Input Buf: RPC Event: pr_Sproc2;1
Requested By:
ResType:LockOwner Stype:'OR' Mode: IX SPID:58 ECID:0 Ec:(0x78181580)
Value:0x57f04c80 Cost:(0/1ED4)
Victim Resource Owner:
ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
Value:0x6847aac0 Cost:(0/0)There is no application to do the parsing, afaik.
Look up "Troubleshooting Deadlocks" in the Books Online. It goods a pretty
good description of how to interpret the information
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Frank Rizzo" <none@.none.com> wrote in message
news:ObGR$%23g6FHA.2092@.TK2MSFTNGP12.phx.gbl...
> When a deadlock occurs, the system dumps a bunch of diagnostics
> information into its error log and ends up looking like the excerpt below.
> Does an application exist anywhere that parses this stuff and tells me
> exactly what tables/indexes/etc... were involved in the deadlock?
>
> Deadlock encountered ... Printing deadlock information
>
>
> Wait-for graph
>
>
> Node:1
> KEY: 13:1171587312:1 (25009a75c3be) CleanCnt:1 Mode: X Flags: 0x0
> Grant List 3::
> Owner:0x45bb0480 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:58
> ECID:0
> SPID: 58 ECID: 0 Statement Type: UPDATE Line #: 596
> Input Buf: RPC Event: pr_Sproc1;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
> Value:0x6847aac0 Cost:(0/0)
>
> Node:2
> TAB: 13:1203587426 [] CleanCnt:1 Mode: S Flags: 0x0
> Grant List 3::
> Owner:0x684935a0 Mode: S Flg:0x0 Ref:1 Life:00000001 SPID:53
> ECID:0
> SPID: 53 ECID: 0 Statement Type: SELECT INTO Line #: 579
> Input Buf: RPC Event: pr_Sproc2;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: IX SPID:58 ECID:0 Ec:(0x78181580)
> Value:0x57f04c80 Cost:(0/1ED4)
> Victim Resource Owner:
> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
> Value:0x6847aac0 Cost:(0/0)
>|||Frank:
If you use profiler, you can get a graphical representation of the
objects/sessions involved in the deadlock. Also, the new TF-1222 provides
much richer information on the deadlock.
Thanks
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Frank Rizzo" <none@.none.com> wrote in message
news:ObGR$%23g6FHA.2092@.TK2MSFTNGP12.phx.gbl...
> When a deadlock occurs, the system dumps a bunch of diagnostics
> information into its error log and ends up looking like the excerpt below.
> Does an application exist anywhere that parses this stuff and tells me
> exactly what tables/indexes/etc... were involved in the deadlock?
>
> Deadlock encountered ... Printing deadlock information
>
>
> Wait-for graph
>
>
> Node:1
> KEY: 13:1171587312:1 (25009a75c3be) CleanCnt:1 Mode: X Flags: 0x0
> Grant List 3::
> Owner:0x45bb0480 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:58
> ECID:0
> SPID: 58 ECID: 0 Statement Type: UPDATE Line #: 596
> Input Buf: RPC Event: pr_Sproc1;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
> Value:0x6847aac0 Cost:(0/0)
>
> Node:2
> TAB: 13:1203587426 [] CleanCnt:1 Mode: S Flags: 0x0
> Grant List 3::
> Owner:0x684935a0 Mode: S Flg:0x0 Ref:1 Life:00000001 SPID:53
> ECID:0
> SPID: 53 ECID: 0 Statement Type: SELECT INTO Line #: 579
> Input Buf: RPC Event: pr_Sproc2;1
> Requested By:
> ResType:LockOwner Stype:'OR' Mode: IX SPID:58 ECID:0 Ec:(0x78181580)
> Value:0x57f04c80 Cost:(0/1ED4)
> Victim Resource Owner:
> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
> Value:0x6847aac0 Cost:(0/0)|||Sorry, I should have pointed out that my previous mail is only applicable
for SQL2005.
--
Sunil Agarwal (MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sunil Agarwal [MSFT]" <sunila@.onlin.microsoft.com> wrote in message
news:e5BGA%23h6FHA.1276@.TK2MSFTNGP09.phx.gbl...
> Frank:
> If you use profiler, you can get a graphical representation of the
> objects/sessions involved in the deadlock. Also, the new TF-1222 provides
> much richer information on the deadlock.
> Thanks
> --
> Sunil Agarwal (MSFT]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> "Frank Rizzo" <none@.none.com> wrote in message
> news:ObGR$%23g6FHA.2092@.TK2MSFTNGP12.phx.gbl...
>> When a deadlock occurs, the system dumps a bunch of diagnostics
>> information into its error log and ends up looking like the excerpt
>> below. Does an application exist anywhere that parses this stuff and
>> tells me exactly what tables/indexes/etc... were involved in the
>> deadlock?
>>
>> Deadlock encountered ... Printing deadlock information
>>
>>
>> Wait-for graph
>>
>>
>> Node:1
>> KEY: 13:1171587312:1 (25009a75c3be) CleanCnt:1 Mode: X Flags: 0x0
>> Grant List 3::
>> Owner:0x45bb0480 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:58
>> ECID:0
>> SPID: 58 ECID: 0 Statement Type: UPDATE Line #: 596
>> Input Buf: RPC Event: pr_Sproc1;1
>> Requested By:
>> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
>> Value:0x6847aac0 Cost:(0/0)
>>
>> Node:2
>> TAB: 13:1203587426 [] CleanCnt:1 Mode: S Flags: 0x0
>> Grant List 3::
>> Owner:0x684935a0 Mode: S Flg:0x0 Ref:1 Life:00000001 SPID:53
>> ECID:0
>> SPID: 53 ECID: 0 Statement Type: SELECT INTO Line #: 579
>> Input Buf: RPC Event: pr_Sproc2;1
>> Requested By:
>> ResType:LockOwner Stype:'OR' Mode: IX SPID:58 ECID:0 Ec:(0x78181580)
>> Value:0x57f04c80 Cost:(0/1ED4)
>> Victim Resource Owner:
>> ResType:LockOwner Stype:'OR' Mode: S SPID:53 ECID:0 Ec:(0x576E3580)
>> Value:0x6847aac0 Cost:(0/0)
>|||Kalen Delaney wrote:
> There is no application to do the parsing, afaik.
> Look up "Troubleshooting Deadlocks" in the Books Online. It goods a pretty
> good description of how to interpret the information
I understand how to interpret them, however, it is a pain. I thought by
now someone had enough of it and wrote something up. Sounds like a
weekend project.

No comments:

Post a Comment