Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Waitresource - Find Exact Key Expand / Collapse
Author
Message
Posted Friday, February 16, 2007 7:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 15, 2012 12:13 PM
Points: 9, Visits: 42

I am trying to interpret deadlock trace information. This is what I see in the waitresource

waitresource=KEY: 9:72057594065256448 (f20077ea2259)

Can someone help me decipher this?

Thanks!

Post #345461
Posted Monday, February 19, 2007 12:00 PM
SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,039, Visits: 1
No one has responded to this topic yet. Even if you don't have a complete answer, the original poster will appreciate any thoughts you have!
Post #345873
Posted Tuesday, February 20, 2007 12:38 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 1:37 PM
Points: 1,396, Visits: 6,414

Hello,

There is a page about locking in sql server 7,2000 where the key is described.

See http://support.microsoft.com/kb/224453/

Post #345941
Posted Monday, December 1, 2008 4:55 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, June 17, 2013 3:34 AM
Points: 21, Visits: 287
That might be a hobt_id. You find it through sys.partitions:

SELECT o.name, i.name
FROM sys.partitions p
JOIN sys.objects o ON p.object_id = o.object_id
JOIN sys.indexes i ON p.object_id = i.object_id
AND p.index_id = i.index_id
WHERE p.hobt_id = 72057594065256448
Post #611750
Posted Monday, April 4, 2011 10:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 9, 2013 10:32 AM
Points: 1, Visits: 34
sys.partitions was introduced in SQL Server 2005, does anyone know the sql server 2000 equivalent?
Post #1088156
Posted Monday, October 17, 2011 12:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 8:15 PM
Points: 11, Visits: 284
please refer

http://support.microsoft.com/kb/224453/

there is a detailed explaination for every kind of waitresrouce.
Post #1191125
Posted Tuesday, February 14, 2012 5:05 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 3, 2014 7:05 AM
Points: 32, Visits: 147
Thanks it was really helpful information
Post #1251825
Posted Friday, August 16, 2013 9:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 8:49 AM
Points: 1, Visits: 77
I stumbled across this post looking for an answer. The link here says it is not possible to get back to the original row but that is not always true. With a low probability the below will return multiple rows because it uses a hash but typically I have found only one match.

declare @databaseName varchar(100) = 'Your Database'--DatabaseName
declare @keyValue varchar(100) = 'KEY: 10:72057600953614336 (0d0120c75d83)'--Output from deadlock graph
declare @lockres varchar(100)
declare @hobbitID bigint
select @hobbitID = convert(bigint,RTRIM(SUBSTRING(@keyValue,CHARINDEX(':',@keyValue,CHARINDEX(':',@keyValue)+1)+1,
CHARINDEX('(',@keyValue)-CHARINDEX(':',@keyValue,CHARINDEX(':',@keyValue)+1)-1)))
select @lockRes = RTRIM(SUBSTRING(@keyValue,CHARINDEX('(',@keyValue)+1,CHARINDEX(')',@keyValue)-CHARINDEX('(',@keyValue)-1))
declare @objectName sysname
declare @ObjectLookupSQL as nvarchar(max) = '
SELECT @objectName = o.name
FROM '+@databaseName+'.sys.partitions p
JOIN '+@databaseName+'.sys.indexes i ON p.index_id = i.index_id AND p.[object_id] = i.[object_id]
join '+@databaseName+'.sys.objects o on o.object_id = i.object_id
WHERE hobt_id = '+convert(nvarchar(50),@hobbitID)+'
'
exec sp_executesql @ObjectLookupSQL, N'@objectName sysname OUTPUT',@objectName=@objectName OUTPUT
select @objectName
declare @finalResult nvarchar(max) = N'select %%lockres%% ,*
from '+@databaseName+'.dbo.' + @objectName + '
where %%lockres%% = ''('+@lockRes+')''
'
exec sp_executesql @finalResult
Post #1485265
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse