Wednesday, March 21, 2012

DBCC PAGE

Can anyone tell me how to get the FileNumber & PageNumber
that a particualar row of data is physically stored on?
I need to check the physical contents of row using DBCC
PAGE but this needs to be given the FileNumber &
PageNumber as parameters.
Steve Morgan
MCP, MCDBA, MCT
Reach Telecom SQL Server DBA
Please reply to the group, not to me!look at www.sqlmag.com for InstantDoc #8097.
"Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
news:008301c37882$cc197d50$a401280a@.phx.gbl...
> Can anyone tell me how to get the FileNumber & PageNumber
> that a particualar row of data is physically stored on?
> I need to check the physical contents of row using DBCC
> PAGE but this needs to be given the FileNumber &
> PageNumber as parameters.
>
> Steve Morgan
> MCP, MCDBA, MCT
> Reach Telecom SQL Server DBA
> Please reply to the group, not to me!|||There is no direct way to map a row to a page number.
As the author of SQL Mag's article 8097, I can say that usually I use DBCC
IND to list all the file number, page number values for a table, and then I
start guessing. If there is a clustered index, you can narrow it down pretty
well, and DBCC IND also shows you the next and previous page so you can
build the linked list of ordered pages.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
news:008301c37882$cc197d50$a401280a@.phx.gbl...
> Can anyone tell me how to get the FileNumber & PageNumber
> that a particualar row of data is physically stored on?
> I need to check the physical contents of row using DBCC
> PAGE but this needs to be given the FileNumber &
> PageNumber as parameters.
>
> Steve Morgan
> MCP, MCDBA, MCT
> Reach Telecom SQL Server DBA
> Please reply to the group, not to me!|||Go to www.sqlfe.com and download the tool. You will find it easy to find
the pages allocated to your table.
--
Barry McAuslin
"Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
news:008301c37882$cc197d50$a401280a@.phx.gbl...
> Can anyone tell me how to get the FileNumber & PageNumber
> that a particualar row of data is physically stored on?
> I need to check the physical contents of row using DBCC
> PAGE but this needs to be given the FileNumber &
> PageNumber as parameters.
>
> Steve Morgan
> MCP, MCDBA, MCT
> Reach Telecom SQL Server DBA
> Please reply to the group, not to me!|||Interesting tool!
But it still might be a choice like between EM and QA, GUI or text command.
I can find the pages that BELONG to a table really quickly with DBCC IND.
But does this tool answer the poster's original question... how to find the
page a particular row is on?
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Barry McAuslin" <barry_mcauslin@.yahoo.com.nospam> wrote in message
news:OSERX5OeDHA.1680@.TK2MSFTNGP09.phx.gbl...
> Go to www.sqlfe.com and download the tool. You will find it easy to find
> the pages allocated to your table.
> --
> Barry McAuslin
> "Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
> news:008301c37882$cc197d50$a401280a@.phx.gbl...
> > Can anyone tell me how to get the FileNumber & PageNumber
> > that a particualar row of data is physically stored on?
> >
> > I need to check the physical contents of row using DBCC
> > PAGE but this needs to be given the FileNumber &
> > PageNumber as parameters.
> >
> >
> >
> > Steve Morgan
> > MCP, MCDBA, MCT
> > Reach Telecom SQL Server DBA
> >
> > Please reply to the group, not to me!
>|||Not directly, but it is more of a follow on to your post. If you view the
indexes, select the table you are after from the list, then the extents that
the table are in will be highlighted. Double clicking on the extent will
give you the DBCC PAGE output from the pages in the extent.
I got the idea from a tool by another database vendor, thought I would like
that for MS SQL. I couldn't find anything! So after reading your book and
working out how to put it all together I decided to write it in my spare
time. Excellent book by the way.
Thanks
--
Barry McAuslin
http://www.sqlfe.com
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:OEuTSGTeDHA.2432@.TK2MSFTNGP09.phx.gbl...
> Interesting tool!
> But it still might be a choice like between EM and QA, GUI or text
command.
> I can find the pages that BELONG to a table really quickly with DBCC IND.
> But does this tool answer the poster's original question... how to find
the
> page a particular row is on?
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "Barry McAuslin" <barry_mcauslin@.yahoo.com.nospam> wrote in message
> news:OSERX5OeDHA.1680@.TK2MSFTNGP09.phx.gbl...
> > Go to www.sqlfe.com and download the tool. You will find it easy to
find
> > the pages allocated to your table.
> >
> > --
> > Barry McAuslin
> >
> > "Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
> > news:008301c37882$cc197d50$a401280a@.phx.gbl...
> > > Can anyone tell me how to get the FileNumber & PageNumber
> > > that a particualar row of data is physically stored on?
> > >
> > > I need to check the physical contents of row using DBCC
> > > PAGE but this needs to be given the FileNumber &
> > > PageNumber as parameters.
> > >
> > >
> > >
> > > Steve Morgan
> > > MCP, MCDBA, MCT
> > > Reach Telecom SQL Server DBA
> > >
> > > Please reply to the group, not to me!
> >
> >
>|||Interesting idea, but maybe you can fix the tool, so it will also work
against a case sensitive server. When I switch to the log I am getting a
FileID not found, looks like you are creating temp tables with very
inconsistent naming and later query for the wrong column name (case wise).
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2003 All rights reserved.
"Barry McAuslin" <barry_mcauslin@.yahoo.com.nospam> wrote in message
news:OSERX5OeDHA.1680@.TK2MSFTNGP09.phx.gbl...
> Go to www.sqlfe.com and download the tool. You will find it easy to find
> the pages allocated to your table.
> --
> Barry McAuslin
> "Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
> news:008301c37882$cc197d50$a401280a@.phx.gbl...
> > Can anyone tell me how to get the FileNumber & PageNumber
> > that a particualar row of data is physically stored on?
> >
> > I need to check the physical contents of row using DBCC
> > PAGE but this needs to be given the FileNumber &
> > PageNumber as parameters.
> >
> >
> >
> > Steve Morgan
> > MCP, MCDBA, MCT
> > Reach Telecom SQL Server DBA
> >
> > Please reply to the group, not to me!
>|||Thanks for that. I will have a fix on the web site in a couple of days.
--
Barry McAuslin
Look inside your SQL Server files with SQL File Explorer.
Go to http://www.sqlfe.com for more information.
"Gert E.R. Drapers" <GertD@.Online.SQLDev.Net> wrote in message
news:uKewyL9eDHA.3104@.TK2MSFTNGP11.phx.gbl...
> Interesting idea, but maybe you can fix the tool, so it will also work
> against a case sensitive server. When I switch to the log I am getting a
> FileID not found, looks like you are creating temp tables with very
> inconsistent naming and later query for the wrong column name (case wise).
> GertD@.SQLDev.Net
> Please reply only to the newsgroups.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use.
> Copyright © SQLDev.Net 1991-2003 All rights reserved.
> "Barry McAuslin" <barry_mcauslin@.yahoo.com.nospam> wrote in message
> news:OSERX5OeDHA.1680@.TK2MSFTNGP09.phx.gbl...
> > Go to www.sqlfe.com and download the tool. You will find it easy to
find
> > the pages allocated to your table.
> >
> > --
> > Barry McAuslin
> >
> > "Steve Morgan" <steve.morgan@.reachtelecom.co.ukNOSPAM> wrote in message
> > news:008301c37882$cc197d50$a401280a@.phx.gbl...
> > > Can anyone tell me how to get the FileNumber & PageNumber
> > > that a particualar row of data is physically stored on?
> > >
> > > I need to check the physical contents of row using DBCC
> > > PAGE but this needs to be given the FileNumber &
> > > PageNumber as parameters.
> > >
> > >
> > >
> > > Steve Morgan
> > > MCP, MCDBA, MCT
> > > Reach Telecom SQL Server DBA
> > >
> > > Please reply to the group, not to me!
> >
> >
>

No comments:

Post a Comment