Page locking

  • When executing sp_lock, you can see the locks on different levels (RowID, Page, Table...). In case of a page lock, an entire page (8KB) is f.ex. exclusivly locked.

    Does there exist a way to find out what other data resides (other records or other tables) in this page? Something like a sp_ListPageContent using the "address" in the resource column (1:1440 i.e. the 1440th page of the 1st physical file).

    Patrick SIMONS, MCP

  • The only one I know of is something like

    USE PUBS

    GO

    DBCC TRACEON(3604)

    GO

    DBCC PAGE(5,1,88,1)

    GO

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

  • Danke Frank, it works.

    BTW. Am I right, that a single SQL Server data page always contains records from one single table. It can never contain data from two tables?

     

    Patrick SIMONS, MCP

  • As the data pages are actually used when you have a clustered index on that table, I guess it won't work, when there were data from different tables on a single page.

    So I would say, they always contain only data from one table.

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

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

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