Find out exact key lock value

  • Using sp_lock I found some key locks:

    ...

    60     50     2123466939  1      KEY  (0100a5ef96a9)   X        GRANT

    ...

    Is it possible to find out the exact key value using the hash value (0100a5ef96a9)?

    Patrick SIMONS, MCP

  • This was removed by the editor as SPAM

  • I don't think you can make use of that value. why not check sysprocesses table? I have used the following script to find what resources are being held on. Focus on waitresource column.

    select spid,  

           blocked,

           waittype,

           waittime,   

           left(lastwaittype, 15) as lastwaittype,

           left(waitresource, 20) as waitresource,

           left(DB_NAME(dbid), 11) as dbname,

           --left(user_name(uid), 15) as User_name,

           open_tran,

           left(status, 12) as status,

           left(hostname, 12) as hostname,

           left(loginame, 12) as loginame,

           left(cmd, 12) as cmd,

           --suid,

           left(program_name, 40) as program_name

           from master..sysprocesses (nolock) where waittype > 0 and waittime > 0

    Once you get a wait resource, you can interpret the table and index key name using DBCC PAGE.

    richard

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply