How can I see the ROWIDs for all the rows in a tab

  • How can I see the rowIDs for all the rows of a particular table?

    If I have a ROWID 1:122223:49

    How can I find out what row is at this

    ROWID address.

    Is there a way I can do

    "select * from TBL_NAME where rowid = '1:122223:49'

  • First where did you get this output? I have seen it before and forget.

    I believe it is FileID, PageID, RowID (or slot)

    To See do the following (sorry this I haven't test and I have not seen such a high PageID except on a large DB so if small I may be wrong that is why I want to know where you got so I can research thru testing directly).

    Try in QA

    -- Must be run first on the connection to use.

    DBCC TRACEON(3604)

    GO

    Then

    DBCC PAGE ('dbname',1,[1-4])

    GO

    I usually use 1 or 3, output does depending on record type stored on that page. Usually if a table item them 1 will give the slot and the Binary data but 3 will give the Slot Binary data and the table version of the data (columns and value).

    The look for Slot 49 should be it.

    Hope I am right but these things vary in so many areas it helps if I can test myself to get the right format.

  • Thanks for the direction you pointed me into. I was able to set the dbcc traceon (3064) but i was unable to run the DBCC Page command. It comes back and says that incorrect number of parameters. When I researhed it over a little bit I found that there are 3 other parameters that may be required.

    dbcc page (pubs, 0000100)

    Herest the ouput i get for the above command execution

    Server: Msg 2583, Level 16, State 2, Line 1

    An incorrect number of parameters was given to the DBCC statement.

    Where would be a good resrouce to locate some info on this issue.

    You help is appreciated.

    -THX

  • For your case try

    DBCC PAGE('dbname',122223, 3)

    For instance to see what is on page 10 in pubs you do

    DBCC PAGE('pubs', 10, 3)

    and see what you get.

    Not really a lot of info on this with 7 and 2000, I had to find in 6.5 book and playing with parameters.

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

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