Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Tuesday, August 25, 2015 9:48 AM
Points: 9, Visits: 54

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,041, 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


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 2:03 AM
Points: 1,514, Visits: 9,274

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: Monday, January 19, 2015 4:39 AM
Points: 1, Visits: 35
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: Thursday, January 21, 2016 6:49 AM
Points: 11, Visits: 302
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: Sunday, July 19, 2015 12:31 AM
Points: 33, Visits: 156
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: Saturday, May 21, 2016 7:37 AM
Points: 1, Visits: 130
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
Posted Monday, January 18, 2016 11:39 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 12:13 AM
Points: 2,114, Visits: 2,869
How to search this key value (@keyValue) in the code?

APPLICATION: 7:0:[TMsgRefs1]8886087a)


Thanks.
Post #1753419
Posted Friday, January 22, 2016 11:38 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, May 27, 2016 4:56 PM
Points: 329, Visits: 1,467
SQL-DBA-01 (1/18/2016)
How to search this key value (@keyValue) in the code?

APPLICATION: 7:0:[TMsgRefs1]8886087a)
Where do you see a "KEY"?
It's an - APPLICATION lock. Caused by sp_getapplock procedure in DB_ID = 7 and Resource = 'TMsgRefs1'



Alex Suprun
Post #1755028
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse