Quick Answer
To handle SQL Server error 823 824, read the message first. Error 823 means the operating system failed a read or write. Error 824 means the read worked but SQL Server found a bad page. Check the suspect_pages table, the Windows event log, drivers and antivirus, run DBCC CHECKDB only to see the damage, and restore a clean backup. If no backup works, a repair tool can read the MDF file directly.
When you see SQL Server error 823 824 in the error log, it is a message about storage, not about your query. SQL Server asks Windows to read or write a page of a database file. Something in that path goes wrong, and SQL Server reports it with severity 24, which SQL Server uses for hardware level errors.
The two numbers look alike, but they report two different failures, and the first check is different for each. This guide explains SQL Server error 823 824 in plain steps and gives a fix order you can follow without guessing.
What Do SQL Server Error 823 and 824 Mean?
Error 823: the operating system failed the call
SQL Server reports error 823 when a Windows file call such as ReadFile or WriteFile fails with an operating system error. The message says the operating system returned an error to SQL Server during a read or write at a given offset in a given file. In this case of SQL Server error 823 824, Windows itself told SQL Server that the call failed.
Error 824: the call worked but the page is wrong
Error 824 is a logical consistency error. Windows says the read or write worked, but SQL Server checks the page and finds a fault. The checks include the checksum, a torn page, a short transfer, a wrong page ID, a stale read and a page audit failure.
How Do SQL Server Error 823 824 Differ from Error 825?
Error 825 often shows up in the log before SQL Server error 823 824 does, so it is worth knowing when you study SQL Server error 823 824. It says a read had to be repeated before it worked. The query did not fail, but the disk path needed more than one try, and that is a warning sign.
If you find error 825 entries, act now. The same causes that produce SQL Server error 823 824 are already at work, and the data can still be copied out safely while the database is readable.
How to Read the Message Before You Fix SQL Server Error 823 824
Read the whole message before you change anything. A SQL Server error 823 824 message carries the facts you need, and each part points to a different check.
- Error number and state. Tells you if it is a call failure (823) or a page fault (824).
- Database ID and file name. Shows which file sits on the faulty path.
- Offset. Divide it by 8,192 to get the page number. An offset of 1,310,720 points to page 160 of that file.
- Operating system error code. In error 823 this number, such as 1117 for an I/O device error or 21 for a device that is not ready, names the failure on the Windows side.
The official error 824 documentation lists every message type and the checks behind it. Write these values down before you restart the service, because a restart can hide the SQL Server error 823 824 details in the log.
What Usually Causes SQL Server Error 823 824?
SQL Server reports the fault, but it rarely creates it. In most cases of SQL Server error 823 824 the damage starts in the input and output path, the layer between SQL Server and the disk.
- A failing disk, a bad sector or an array that lost a drive.
- A controller, host bus adapter or firmware fault.
- A filter driver, often from an antivirus or backup agent, that scans database files and breaks a call.
- An unstable network share, NAS or SAN link that drops during a write.
- The page verify option set to something weaker than CHECKSUM, so damage is found late.
This list is also your search order. Hardware and drivers come first because a repair on a bad disk only damages more pages. A restore on a bad path brings the same SQL Server error 823 824 back.
In What Order Should You Fix SQL Server Error 823 824?
Follow these steps in order to fix SQL Server error 823 824. The first four are checks that change nothing, so they are safe to run on a live server.
Step 1. Query the suspect pages table
SQL Server records pages that raised SQL Server error 823 824 in the msdb database. Run this query to see them:
SELECT database_id, file_id, page_id, event_type, error_count, last_update_date
FROM msdb.dbo.suspect_pages;
Event types 1, 2 and 3 are the damaged states you care about, and the other values mark pages that were restored or repaired. If the same pages repeat, the fault is stable. If new pages keep appearing, the disk is still failing and SQL Server error 823 824 will return.
Step 2. Read the Windows event logs
Open the System and Application logs around the time of the error. Look for disk, controller, driver or network share errors. For SQL Server error 823 824 with a Windows code like 1117 or 21, the event log usually names the cause before any SQL tool does.
Step 3. Check drivers, filter drivers and antivirus
List the filter drivers with fltmc filters and fltmc instances. Update the storage drivers, and exclude the database and log files from antivirus scanning. On a virtual machine, update the virtualization drivers as well. A filter driver that scans MDF files in real time is a common hidden cause.
Step 4. Make sure the page verify option is CHECKSUM
Run this query to find databases that use a weaker setting:
SELECT name, page_verify_option_desc
FROM sys.databases
WHERE page_verify_option_desc <> 'CHECKSUM';
Change them with ALTER DATABASE YourDatabase SET PAGE_VERIFY CHECKSUM;. Pages written after this change carry a checksum, so later SQL Server error 823 824 faults are caught early.
Step 5. Test the storage with SQLIOSim
SQLIOSim ships with SQL Server and sits in the Binn folder. It writes and reads test data in the same pattern SQL Server uses, so it can show the storage fault behind SQL Server error 823 824 under load. Run it on the database volume in a quiet window.
Step 6. Use the vendor tools
Ask the storage or server vendor for diagnostic tools and firmware updates. A SQL Server error 823 824 that leads back to one array or one controller is a hardware case, and only the vendor can confirm and fix it.
Step 7. Run DBCC CHECKDB to see the damage
Run a check on every database on the affected volume, not only the one in the message:
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;
Use it only to measure the damage. If CHECKDB finds no errors, the cause of SQL Server error 823 824 may be an intermittent disk fault, so keep watching the logs. If it finds errors, do not jump to a repair option yet. Our guide on DBCC CHECKDB failures and repair levels explains what each level removes, and it is better to read it before you use one.
How to Restore a Clean Backup After SQL Server Error 823 824
After the storage path is stable, a clean backup is the safest fix for SQL Server error 823 824. A restore brings back pages that were written when the disk was healthy, and it does not remove data the way a repair option can.
- Restore the last full backup that passes
RESTORE VERIFYONLY. - Apply the differential and log backups up to the point before the first error in the log.
- Run DBCC CHECKDB again on the restored database.
If suspect_pages shows only a few damaged pages and you have log backups under the full recovery model, a page restore can fix just those pages instead of the whole database. It suits SQL Server error 823 824 that hits only a few pages.
Do not restore onto the same failing disk, or SQL Server error 823 824 can return on the new copy.
What If There Is No Clean Backup for SQL Server Error 823 824?
Sometimes every backup is old, missing or fails to restore. Then SQL Server error 823 824 leaves you with damaged files and no clean copy. In that case, work on a copy of the files, not on the originals.
First stop the service if you can, and copy the MDF and NDF files to a healthy disk. A dedicated tool such as SQL Recovery can then read those files directly, without SQL Server, and show what is readable.

The tool offers two scan modes. Quick Scan opens healthy files and files with normal corruption, and Advance Scan handles severe corruption and deleted records. After the scan, you can preview tables, views, stored procedures and triggers before you export anything, so you see the result of your SQL Server error 823 824 case before you spend money.

The free demo shows all recovered data, and exports stop at 25 records per table. A licensed copy exports to a SQL Server database, SQL scripts or CSV files.

Keep the original files untouched until the exported database passes DBCC CHECKDB. The tool does not repair the disk, so fix the storage path first.
How to Prevent SQL Server Error 823 824 from Returning
You cannot remove every hardware fault, but you can make SQL Server error 823 824 show up early and cause less harm.
- Keep PAGE_VERIFY set to CHECKSUM on every database, so damaged pages are found when they are read.
- Create SQL Server Agent alerts for severity 24 and for errors 823, 824 and 825, so a warning reaches you the same day.
- Run DBCC CHECKDB on a schedule, take backups with the CHECKSUM option and test them on a spare server.
- Keep firmware and storage drivers current, and exclude database files from antivirus scans.
The checks cost little. One alert on error 825 is often the only notice before a hard SQL Server error 823 824 failure, so do not ignore it.
Conclusion
SQL Server error 823 824 is a storage warning that SQL Server reports on behalf of the disk path. Error 823 means Windows failed the call, and error 824 means the page came back wrong. Read the message, note the offset, check the event log and drivers, set CHECKSUM, test the disk and use DBCC CHECKDB to see the damage before you decide anything.
Restore a clean backup on a healthy disk when you have one. When no backup works, copy the files and use a recovery tool to preview what can be saved. You can try the free demo of SQL Recovery first and buy a license only after you see your data.
FAQs
What is the difference between SQL Server error 823 and 824?
Error 823 means a Windows read or write call failed, so the operating system returned an error to SQL Server. Error 824 means Windows said the read or write worked, but SQL Server found a logical problem in the page, such as a bad checksum or a wrong page ID. In both cases of SQL Server error 823 824 the first suspect is the storage path.
Is SQL Server error 823 824 a SQL Server bug?
Rarely. For SQL Server error 823 824, SQL Server only reports the fault, and it usually sits outside it, in a failing disk, a bad controller, an old driver, a filter driver or an unstable network share.
How many times does SQL Server retry before it raises error 823 or 824?
For a read, SQL Server retries four times before it returns the error. If a retry works, the query does not fail, but error 825 is written to the log. Treat that warning as an early sign of SQL Server error 823 824.
How do I find the damaged page in SQL Server error 823 824?
For SQL Server error 823 824, read the offset in the message and divide it by 8,192. The result is the page number inside that file. You can also query msdb.dbo.suspect_pages, which lists the database ID, file ID and page ID for pages that raised these errors.
Should I run REPAIR_ALLOW_DATA_LOSS for SQL Server error 823 824?
No. Repair options can remove data, and they do not fix the failing disk behind SQL Server error 823 824. Find and fix the cause first, use DBCC CHECKDB only to see the damage, and restore a clean backup if you have one. The separate guide on DBCC CHECKDB failures covers the repair levels.
Can SQL Server error 823 824 come back after I restore the database?
Yes, if the storage fault is still there. A restore puts good pages on a bad path, so check the event log, drivers and disk health first.
What can I do about SQL Server error 823 824 if every backup fails?
Copy the MDF and NDF files to a healthy disk, then use a dedicated MDF recovery tool to scan them and preview the tables before you export. The section on the no backup case above shows the steps.