Sql-server – DBCC CHECKDB consistency-based I/O error

consistencydbcc-checkdbsql serversql-server-2008-r2

Running:

DBCC CHECKDB(DatabaseName) with NO_INFOMSGS 

gives me the following error:

Msg 824, Level 24, State 2, Line 1
SQL Server detected a logical
consistency-based I/O error: incorrect pageid (expected 1:7753115;
actual 0:0). It occurred during a read of page (1:7753115) in database
ID 11 at offset 0x00000ec9b36000 in file 'K:\UAT
Databases\dbname.MDF'. Additional messages in the SQL Server error
log or system event log may provide more detail. This is a severe
error condition that threatens database integrity and must be
corrected immediately. Complete a full database consistency check
(DBCC CHECKDB). This error can be caused by many factors; for more
information, see SQL Server Books Online.'

Also i found a entry in dbo.suspect_pages

Please advise.

Best Answer

  1. Ensure you have a valid backup; hopefully it will be from prior to the corruption, but not so long ago that the data isn't useful. You should set this aside in case direct repair isn't possible and you need to recover data from the backup.

  2. The documentation explains what to do to correct the problem - you can try the REPAIR_REBUILD option, and if that doesn't solve it, you can move on to next steps according to the guy who wrote CHECKDB, Paul Randal. He has a ton of articles on CHECKDB, that cover just about every conceivable scenario, but which ones are relevant to you will depend on what happens next when you attempt your repair. One that may be useful as a start, so you know which table you'll need to fix: