Thursday, June 3, 2010

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

Are you getting 'Error 823' while accessing an SQL Server database or modifying the database? Are you getting various database inconsistency errors while querying SQL Server database? Well, the problem may take place if your SQL Server database is either inconsistent or damaged. In such critical situations, you must have a complete backup to restore data from it. However, the situations may become worse if there is no current backup in place. At this point of time, you have to opt for SQL recovery tools to get your valuable data recovered.

You may come across the below errors in Windows Application Event Log or MS SQL Server ERRORLOG while performing any operation on MDF (Master Database File) of SQL Server:

"2010-03-06 22:41:19.55 spid58 Error: 823, Severity: 24, State: 2. 2010-03-06 22:41:19.55 spid58 The operating system returned error 38(Reached the end of the file.) to SQL Server during a read at offset 0x000000a72c0000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\my_db.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."

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.

Cause:

The Error 823 may occur due to either SQL Server database corruption or I/O errors in the database. The error usually indicates that that there are some inconsistency in file system or the database file is corrupt.

Resolution
:

To recover SQL server database, use any of the below methods:

Run Chkdsk to find file system inconsistency issues and resolve it.

Use DBCC CHECKDB utility to try repairing the damaged database.

If the above methods can not perform MS SQL recovery, You need to use third party applications to repair and restore the damaged database. The MDF Repair software performs safe, quick, easy, and absolute recovery in all MDF corruption situations.

Stellar Phoenix SQL Recovery is the most advanced and efficient utility to ensure absolute recovery of damaged database. The software is designed for Microsoft SQL Server 2008, 2005, and 2000. It restores all the objects of MDF file, such as tables, reports, forms, macros, triggers, constraints, and stored procedures.

Resource taken from: http://www.programmersheaven.com/user/markwillium/blog/5372-How-to-Resolve-Error-823-While-Accessing-SQL-Server-Database/

No comments:

Post a Comment