How to Resolve SQL Server Page Level Corruption

Error 823 or 824 on a page? Learn how to find the damaged pages and restore them from a backup.

Fact-checked Reviewed by Aswin Vijayan Updated November 2, 2026 Based on 4 sources
Summary

SQL Server marks a data page as suspect after read error 823 or 824. Query suspect_pages in the msdb database to find the damaged page numbers. Restore only those pages from a backup when the database uses the full recovery model. Restore the whole database from a good backup when many pages fail. Treat the repair option of the integrity check as a last resort because it can delete data.

SQL Server reports a read error on one data page and your queries fail. Other parts of the database look fine.

This guide explains what page level corruption is and shows how to find the damaged pages and restore them from a backup. Every command below is untested and follows the official pages, so try it on a copy first.

What is SQL Server Page Level Corruption?

SQL Server stores data in 8 KB pages. Page level corruption means that the engine cannot read one or more of those pages correctly.

Microsoft states that a page becomes suspect when a read returns an 823 error caused by an operating system CRC such as a disk error or an 824 error such as a torn page. See managing the suspect pages table.

  • Hardware failure. Failing disks and controllers damage pages.
  • I/O path problems. Broken cables and network connections can return bad reads.
  • Logical errors. Torn pages and bad checksums mark a page as damaged.

How do You Find the Damaged Pages?

SQL Server records suspect pages during a query read, a DBCC CHECKDB operation and a backup. It stores them in the suspect_pages table of the msdb database.

Query Window (T-SQL)
SELECT * FROM msdb.dbo.suspect_pages
WHERE event_type IN (1, 2, 3)
Event types 1, 2 and 3 mark pages with 823 errors, bad checksums and torn pages

Check the whole database with DBCC CHECKDB. Microsoft states that the command validates the logical and physical integrity of all objects in the database. See DBCC CHECKDB.

Query Window (T-SQL)
DBCC CHECKDB (PagesDemoDB) WITH NO_INFOMSGS

This table stores up to 1,000 rows and logs no new errors after it fills. Delete old rows with event types 4, 5 and 7 on a schedule.

How do You Restore Damaged Pages From a Backup?

Microsoft states that a page restore replaces only the damaged pages with copies from a backup. Other pages in the database remain available. See restore pages.

RequirementDetail
Recovery modelFull or bulk logged. Page restore generally does not work with bulk logged
FilegroupsRead and write filegroups only
EditionOffline page restore in all editions. Online page restore in Enterprise
Tail logNeeded first when damaged pages hold critical metadata
  1. Find the file ID and page ID of each damaged page in suspect_pages.
  2. Restore the pages from a full backup with NORECOVERY.
  3. Restore every later log backup with NORECOVERY.
  4. Create a new log backup and restore it with RECOVERY.
Query Window (T-SQL)
RESTORE DATABASE PagesDemoDB PAGE = '1:57, 1:202'
FROM DISK = N'D:\Backups\PagesDemoDB_Full.bak'
WITH NORECOVERY;
RESTORE LOG PagesDemoDB FROM DISK = N'D:\Backups\PagesDemoDB_Log1.trn'
WITH NORECOVERY;
BACKUP LOG PagesDemoDB TO DISK = N'D:\Backups\PagesDemoDB_Tail.trn';
RESTORE LOG PagesDemoDB FROM DISK = N'D:\Backups\PagesDemoDB_Tail.trn'
WITH RECOVERY;
Sample names. Replace the database, page numbers and paths with your own values

What can Page Restore Not Fix?

Microsoft states that page restore cannot restore the transaction log, the allocation pages (GAM, SGAM and PFS), page 0 of every data file, page 1:9 or a full text catalog.

Microsoft also states that restoring a whole file is more efficient when you must restore more than a few pages in one file.

Should You Use REPAIR_ALLOW_DATA_LOSS?

No unless no backup exists. Microsoft states that the option can cause more data loss than a restore from the last known good backup and calls it an emergency last resort.

Microsoft also advises you to create physical copies of the database files before you use it. Deallocated data cannot be recovered afterward.

How do You Prevent Page Corruption?

  • Back up on a schedule. Page restore needs a full backup and the log chain.
  • Check on a schedule. Microsoft recommends DBCC CHECKDB with PHYSICAL_ONLY for frequent use and a full check at longer intervals.
  • Watch the disk. Many new suspect page rows point to a problem with the I/O subsystem.
  • Use availability groups. Replicas can repair corrupted pages from another replica automatically.

For the larger picture see the SQL Server disaster recovery options. For the Microsoft page on automatic page repair see availability groups overview.

Frequently Asked Questions

What Causes SQL Server Page Level Corruption?

Failing disks, I/O path problems and logical errors such as torn pages cause it. Microsoft links suspect pages to 823 and 824 errors.

How do I Find Corrupt Pages?

Query suspect_pages in msdb and execute DBCC CHECKDB on the database.

Can I Restore One Page Instead of the Database?

Yes. Page restore needs the full or bulk logged recovery model and a backup that contains the page.

Does Page Restore Need the Database Offline?

Offline page restore works in all editions. Online page restore needs Enterprise edition.

Is REPAIR_ALLOW_DATA_LOSS Safe?

No. Microsoft calls it a last resort and recommends a restore from a good backup instead.

Can Availability Groups Repair Pages?

Yes. Replicas can recover corrupted pages by getting a fresh copy from another replica.

Key Takeaways

  • Read errors 823 and 824 mark a data page as suspect.
  • Table suspect_pages in msdb lists the damaged pages.
  • Page restore replaces only the damaged pages and needs the full or bulk logged recovery model.
  • Restoring from a good backup beats REPAIR_ALLOW_DATA_LOSS.
  • Frequent integrity checks find damage before users do.

Sources and References

This guide follows Microsoft documentation. Commands are untested.

  1. Manage the suspect_pages Table (Microsoft Learn) learn.microsoft.com
  2. Restore Pages (Microsoft Learn) learn.microsoft.com
  3. DBCC CHECKDB (Microsoft Learn) learn.microsoft.com
  4. Availability Groups Overview (Microsoft Learn) learn.microsoft.com