Page Lock and Objects

  • Hello,

    While running SP_Lock, I get the page informations of all pagelocks. Can I find out what table a page belong to?

    Thanks in advance.

  • Yes you can...

    sp_lock returns the id ob the object that are locked.

    With: SELECT OBJECT_NAME(IDNumber)

    you will know with object it is.

  • Thanks very much. Is there any other way of finding the object with the page number? (ignoring SP_Lock)

    Thanks

  • The page header contains the ID of the object to which this page belongs.

    You can have a play with

    
    
    dbcc traceon(3604)
    go
    dbcc page(your values go here)

    One of the values returned in the page header section is the objid to which the page belongs.

    But racosta's solution is easier.

    Frank

    http://www.insidesql.de

    http://www.familienzirkus.de

    Edited by - Frank kalis on 11/27/2003 1:27:52 PM

    Edited by - Frank kalis on 11/27/2003 1:28:32 PM

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Thanks very much. Very much appreciated.

Viewing 5 posts - 1 through 4 (of 4 total)

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