How to interpret a Resoure string in sp_lock output

  • Hi!

        The following login caused the blocking. I ran an enhanced version of sp_lock and got the following information in the output:

    SPID #279

    Login    : testuser           

    Host    : mytesthost

    Database : mytestdb

    ==============================================================

    Owner  Object Name    Index Name   Type     Resource        Mode      Status

    -----  --------------  -----------  --------- ---------------- --------  ---------------

    dbo    seq_num        seq_num_pk   KEY       (2b0299248951)   X        GRANT

    dbo    seq_num        seq_num_pk   PAG            5.969444444 IX        GRANT

    NULL   NULL              NULL           DB                                 S        GRANT

    dbo    seq_num         NULL           TAB                                IX        GRANT

    The seq_num_pk is a clustered index (created for the primary key). The seq_num is a small table (< 100 rows) called by a SP to return a next sequence number. The DML operations onthis table are SELECT and UPDATE.

    I know the string (2b0299248951) in Resource column is the hashed value of the key. My question is how can I convert it to a decimal value; and does anyone know how to interpret the string 5.969444444 or point me to a place I can find the explanation?

    Regards,

    Peter Lo

     

  • Without having access to the hash function used by SQL Server, I don't see how you could convert it.

    The resource for PAG (page lock) type is supposed to a combination of the file id (see master..sysfiles) and the page number.

    Have you read this? http://msdn2.microsoft.com/en-us/library/ms187749.aspx

     

  • Yes, I read the sp_lock page before I posted my question. In my sp_lock output, I also saw the resource for PAG is a combination of the file id and the page number (i.e 1:9731013) which sp_lock page explains. But, the sp_lock page did not explain how to interpret the resource 5.96944444444444.

    -- Peter Lo

     

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

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