Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DBCC CHECKTABLE not reporting errors Expand / Collapse
Author
Message
Posted Friday, September 27, 2013 3:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 5:36 AM
Points: 6, Visits: 269
Hi,

I've recently implemented a new DBCC INTEGRITY check process running a combination of CHECKDB (for the smaller databases) and CHECKTABLE for larger - spread over a few days.

During my testing of the CHECKTABLE element, I've noticed that the CHECKTABLE does not always report the integrity errors.

If I repeatably run the check, about 1 in 4 times it reports no errors at all, the other times it does - see below :-

ERRORS :-

Error Level State MessageText
8928 16 1 Object ID 2105058535, index ID 0, partition ID 72057594038779904, alloc unit ID 72057594039828480 (type In-row data): Page (1:79) could not be processed. See other errors for details.
8939 16 98 Table error: Object ID 2105058535, index ID 0, partition ID 72057594038779904, alloc unit ID 72057594039828480 (type In-row data), page (1:79). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 29493257 and -4.
2593 10 1 There are 911 rows in 11 pages for object "CorruptTable".
8990 10 1 CHECKTABLE found 0 allocation errors and 2 consistency errors in table 'CorruptTable' (object ID 2105058535).

No ERRORS :-

Error Level State MessageText
2593 10 1 There are 911 rows in 11 pages for object "CorruptTable".


I should add, for the test, I manually corrupted the "test" database by manually editing the MDF files on a particular value. This issue is occuring on SQL2008(SP2), on my SQL2012 instance it seems to behave itself as expected. I appreciate that this could because this is a forced corruption, but surely a corrupt database is still a corrupt database by whatever means.

Has anyone else seen this behavour?

Thanks
Post #1499288
Posted Friday, September 27, 2013 3:56 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 21, 2013 3:10 AM
Points: 81, Visits: 191
EarnestGoesWest (9/27/2013)
Hi,

I've recently implemented a new DBCC INTEGRITY check process running a combination of CHECKDB (for the smaller databases) and CHECKTABLE for larger - spread over a few days.

During my testing of the CHECKTABLE element, I've noticed that the CHECKTABLE does not always report the integrity errors.

If I repeatably run the check, about 1 in 4 times it reports no errors at all, the other times it does - see below :-

ERRORS :-

Error Level State MessageText
8928 16 1 Object ID 2105058535, index ID 0, partition ID 72057594038779904, alloc unit ID 72057594039828480 (type In-row data): Page (1:79) could not be processed. See other errors for details.
8939 16 98 Table error: Object ID 2105058535, index ID 0, partition ID 72057594038779904, alloc unit ID 72057594039828480 (type In-row data), page (1:79). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 29493257 and -4.
2593 10 1 There are 911 rows in 11 pages for object "CorruptTable".
8990 10 1 CHECKTABLE found 0 allocation errors and 2 consistency errors in table 'CorruptTable' (object ID 2105058535).

No ERRORS :-

Error Level State MessageText
2593 10 1 There are 911 rows in 11 pages for object "CorruptTable".


I should add, for the test, I manually corrupted the "test" database by manually editing the MDF files on a particular value. This issue is occuring on SQL2008(SP2), on my SQL2012 instance it seems to behave itself as expected. I appreciate that this could because this is a forced corruption, but surely a corrupt database is still a corrupt database by whatever means.

Has anyone else seen this behavour?

Thanks


show us the code?..thanks
Post #1499290
Posted Friday, September 27, 2013 4:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 5:36 AM
Points: 6, Visits: 269
Hi,

Here it is.

DBCC CHECKTABLE ('[dbo].[CorruptTable]') WITH ALL_ERRORMSGS, TABLERESULTS;

Thanks.
Post #1499291
Posted Friday, September 27, 2013 4:10 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 21, 2013 3:10 AM
Points: 81, Visits: 191
EarnestGoesWest (9/27/2013)
Hi,

Here it is.

DBCC CHECKTABLE ('[dbo].[CorruptTable]') WITH ALL_ERRORMSGS, TABLERESULTS;

Thanks.


i hope this will help


http://www.sqlsoldier.com/wp/sqlserver/day24of31daysofdisasterrecoveryhandlingcorruptioninaclusteredindex
Post #1499292
Posted Friday, September 27, 2013 6:14 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:33 PM
Points: 42,818, Visits: 35,943
If there is corruption, CheckDB will always find it. If you've manually edited an unallocated page, or the middle of a page when you don't have page checksums enabled, then the changes may go unnoticed. Unallocated pages aren't checked because there's no way to tell whether there's damage or not, they're unallocated so they're allowed to be absolute garbage.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1499342
Posted Friday, September 27, 2013 9:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 5:36 AM
Points: 6, Visits: 269
Thanks for your response.

The page I modified was allocated as it was a page containing the orginal data inserted into the table.

DBCC CHECKDB does fail and correctly report the error, also MSDB contains the page within SUSPECT_PAGES. DBCC CHECKTABLE is not reporting the error consistantly is my primary concern, especially as I am planning to make use of CHECKTABLE on our production databases.

Thanks.
Post #1499454
Posted Friday, September 27, 2013 9:57 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:33 PM
Points: 42,818, Visits: 35,943
You can't just run checktable on all tables, you need check alloc and check catalog too. Could be that it's one of those phases that's failing checkDB. Can't tell without more info.

CheckDB is Check Alloc, Check Catalog and then Check table on all tables.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1499488
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse