DBCC ShowContig Produces Error(s) For Table(s) | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

DBCC ShowContig Produces Error(s) For Table(s)

These errors come up when I do the following: DBCC SHOWCONTIG (on each table)
Server: Msg 8939, Level 16, State 4, Line 1
Table error: Object ID 99, index ID 0, page (1:161760). Test (!(m_flagBits & PG_ALIGNED4)) failed. Values are 4102 and 99.
Server: Msg 8946, Level 16, State 1, Line 1
Table error: Allocation page (1:161760) has invalid PFS_PAGE page header values. Type is 0. Check type, object ID and page ID on the page. DBCC CheckTable (on each table)
Server: Msg 8946, Level 16, State 12, Line 2
Table error: Allocation page (1:161760) has invalid PFS_PAGE page header values. Type is 0. Check type, object ID and page ID on the page.
DBCC execution completed. If DBCC printed error messages, contact your system administrator. DBCC CheckAlloc (for database)
Server: Msg 8998, Level 16, State 1, Line 1
Page errors on the GAM, SGAM, or PFS pages do not allow CHECKALLOC to verify database ID 12 pages from (1:161760) to (1:169847). See other errors for cause.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 99, index ID 0, page (1:161760). Test (!(m_flagBits & PG_ALIGNED4)) failed. Values are 4102 and 99.
DBCC results for ‘best_spgi_app’.
The repair level on the DBCC statement caused this repair to be bypassed.
CHECKALLOC found 1 allocation errors and 0 consistency errors not associated with any single object. I have no idea how to fix these errors. Does anybody have any ideas or have seen this before? Thanks in advance for your help.
Don Piluso
Don, I think there is some serious error on a particular page in the database. Are you able to read data from the table for which the oject ID is mentioned? if so, then copy the data from this table into some other table and then recreate the table and data after dropping the present table. DOn’t forget to run DBCC CHECKALLOC() after this operation. Hope this solves the problem…. Gaurav
This causes if any data file in the database has a size that is evenly divisible by 511232, the number of pages in a Global Allocation Map (GAM) interval, these error messages occur. The errors alone do not indicate any real problem with the database but might lead the user to believe a problem exists. Make sure that these are the only error messages reported by DBCC CHECKALLOC and DBCC CHECKDB. Also, make sure that the GAM page reported as "out of range" in the 8968 error message is evenly divisible by 511232. If both of these conditions are true, then increasing the size of the database file, by using an ALTER DATABASE statement, resolves the problem. Make sure that the auto shrink option is not set to on for this database, which might undo the effects of the ALTER DATABASE. Run DBCC CHECKDB with REPAIR clause to overcome some of the errors.
Make sure you have latest SP for SQL server.
Satya SKJ
]]>