Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to troubleshoot SQL Server database consistency errors


View products that this article applies to.

Symptoms

You might encounter the following error messages when an application submits a query

Msg 605, Level 21, State 3, Line 1
Attempt to fetch logical page (1:224) in database 11 failed. It belongs to allocation unit 72058253744865280 not to 72057594040287232

2009-11-02 15:46:42.90 spid51      Error: 824, Severity: 24, State: 2. 2009-11-02 15:46:42.90 spid51      SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:43686; actual 0:0). It occurred during a read of page (1:43686) in database ID 23 at offset 0x0000001554c000 in file 'H:\MSSQL.SQL2008\MSSQL\DATA\my_db.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.

Msg 5180, Level 22, State 1, Line 1
Could not open File Control Bank (FCB) for invalid file ID 255 in database 'mydb'. Verify the file location. Execute DBCC CHECKDB.

Msg 7105, Level 22, State 6, Line 1
The Database ID 11, Page (255:177), slot 1 for LOB data type node does not exist. This is usually caused by transactions that can read uncommitted data on a data page. Run DBCC CHECKTABLE

2009-12-09 04:53:49.170 spid25s      Error: 823, Severity: 24, State: 2. 
2009-12-09 04:53:49.170 spid25s      The operating system returned error 21(The device is not ready.) to SQL Server during a read at offset 0x00000000132000 in file 'D:\tempdb\tempdb_data.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level 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.



You may also notice these error messages recorded in the SQL Server error log and the Windows Application event log.


↑ Back to the top


Cause

These messages report a inconsistency encountered while attempting to execute queries or internal operations. The cause for these vary depending upon the situations. Refer to the Resolution section for more information about the possible cause for each one of these errors.

↑ Back to the top


More Information

For more information about the products or tools that automatically check for this condition on your instance of SQL Server and on the versions of the SQL Server product, see the following table:
Rule software

Rule title

Rule description

Product versions against which the rule is evaluated
SQL Server 2008 R2 Best Practice Analyzer (SQL Server 2008 R2 BPA)





Critical SQL database inconsistency errors found






The SQL Server 2008 R2 Best Practice Analyzer (SQL Server 2008 R2 BPA) provides a rule to detect situations where databases encountered critical consistency errors [605, 824, 5180, 7105, 823]. The SQL Server 2008 R2 BPA supports both SQL Server 2008 and SQL Server 2008 R2. 

If you run the BPA tool and encounter an Error with the title of Database Engine - Critical SQL database inconsistency errors found, then you need to follow the recommendations from the resolution section of this article. You have to examine each instance of the errors and perform necessary corrective action.
SQL Server 2008
SQL Server 2008 R2







SQL Server 2012 Best Practice Analyzer (SQL Server 2012 BPA)




Critical SQL database inconsistency errors found




The SQL Server 2012 Best Practice Analyzer (SQL Server 2012 BPA) provides a rule to detect situations where databases encountered critical consistency errors [605, 824, 5180, 7105, 823].

If you run the BPA tool and encounter an Error with the title of Database Engine - Critical SQL database inconsistency errors found, then you need to follow the recommendations from the resolution section of this article. You have to examine each instance of the errors and perform necessary corrective action.
SQL Server 2012








↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2152734
Revision : 1
Created on : 1/7/2017
Published on : 5/7/2014
Exists online : False
Views : 719