Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 How to identify the base table for a PageID ?

Author  Topic 

Analyzer
Posting Yak Master

115 Posts

Posted - 2007-07-19 : 06:41:26
Hi,

Have a LOB error which provides the corrupt PageID and this recommends a DBCC CHECKDB. However I'm unable to identify what the base table for the PageID. DBCC PAGE does not provide base table info (I think), DBCC PGLINKAGE has been retired in SS2005 and DBCC READPAGE doesn't work either.

Does any know of a valid SS2005 command or technique which will allow my to identify the base table for a PageID???

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2007-07-19 : 10:10:12
DBCC PAGE provides all the info you need - look for the parts of the header output starting 'Metadata' - I specifically put this in to avoid people having to look the object/index up themselves.

Paul Randal
Principal Lead Program Manager, Microsoft SQL Server Core Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
Go to Top of Page

Analyzer
Posting Yak Master

115 Posts

Posted - 2007-07-19 : 11:11:22
Thanks - that was confirmation I needed. I followed up by obtaining the object name from DBCC PAGE with the following command.

SELECT OBJECT_NAME(i.object_id) as object_name, *
from sys.dm_db_index_usage_stats as i
where object_id = <...>

Much appreciated
Go to Top of Page

paulrandal
Yak with Vast SQL Skills

899 Posts

Posted - 2007-07-19 : 12:54:02
ok - why not just do

select object_name (objectidfromdbccpage)

?

Paul Randal
Principal Lead Program Manager, Microsoft SQL Server Core Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
Go to Top of Page

Analyzer
Posting Yak Master

115 Posts

Posted - 2007-07-20 : 06:19:11
Could it get any simpler - thanks, I never knew this command!
Go to Top of Page
   

- Advertisement -