How to Resolve 'Error 823' While Accessing SQL Server Database?

Are you getting 'Error 823' while accessing an SQL24, State: 2.
Server database or modifying the database? Are you2009-12-09 04:53:49.170 spid25s The operating system
getting various database inconsistency errors whilereturned error 21(The device is not ready.) to SQL
querying SQL Server database? Well, the problemServer during a read at offset 0x00000000132000 in
may take place if your SQL Server database is eitherfile 'D:\tempdb\tempdb_data.mdf'. Additional messages
inconsistent or damaged. In such critical situations, youin the SQL Server error log and system event log
must have a complete backup to restore data from it.may provide more detail. This is a severe system-level
However, the situations may become worse if there iserror condition that threatens database integrity and
no current backup in place. At this point of time, youmust be corrected immediately. Complete a full
have to opt for SQL recovery tools to get yourdatabase consistency check (DBCC CHECKDB). This
valuable data recovered.error can be caused by many factors; for more
You may come across the below errors in Windowsinformation, see SQL Server Books Online.
Application Event Log or MS SQL ServerCause:
ERRORLOG while performing any operation on MDFThe Error 823 may occur due to either SQL Server
(Master Database File) of SQL Server:database corruption or I/O errors in the database. The
"2010-03-06 22:41:19.55 spid58 Error: 823, Severity: 24,error usually indicates that that there are some
State: 2.inconsistency in file system or the database file is
2010-03-06 22:41:19.55 spid58 The operating systemcorrupt.
returned error 38(Reached the end of the file.) to SQLResolution:
Server during a read at offset 0x000000a72c0000 inTo recover SQL server database, use any of the
file 'C:\Program Files\Microsoft SQLbelow methods:
f'. Additional messages in the SQL Server error logRun Chkdsk to find file system inconsistency issues
and system event log may provide more detail. This isand resolve it.
a severe system-level error condition that threatensUse DBCC CHECKDB utility to try repairing the
database integrity and must be corrected immediately.damaged database.
Complete a full database consistency check (DBCCIf the above methods can not perform MS SQL
CHECKDB). This error can be caused by manyrecovery, You need to use third party applications to
factors; for more information, see SQL Server Booksrepair and restore the damaged database. The MDF
Online."Repair software performs safe, quick, easy, and
2009-12-09 04:53:49.170 spid25s Error: 823, Severity:absolute recovery in all MDF corruption situations.