Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 8909

Error 8909 and DBCC CHECKDB Allocation Errors: Repair Without Losing Rows

12 min read Updated October 5, 2026 SQL Server

Fix it now

8909 means a page’s own header carries the wrong page ID. Restarting the instance will not clear it and it rarely starts inside SQL Server: something below the engine returned the wrong bytes. The order that keeps your data is preserve, measure, restore, and repair only when no restore exists.

Run these in order, and keep every line of the CHECKDB output

BACKUP DATABASE [MyDb] TO DISK = N'D:\Triage\MyDb_damaged.bak' WITH COPY_ONLY, CONTINUE_AFTER_ERROR;
DBCC CHECKDB (N'MyDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;
SELECT * FROM msdb.dbo.suspect_pages;
  1. Stop maintenance jobs first, especially index rebuilds and any backup that overwrites an existing file, so you do not destroy your last clean copy.
  2. Read the whole CHECKDB output, not the first line. The index IDs in it decide whether you are looking at a rebuildable index or at real data.
  3. Check the Windows System event log for disk, HBA, multipath or controller entries around the first failure.
  4. Restore from the newest backup that passes RESTORE VERIFYONLY WITH CHECKSUM, or restore just the damaged pages if the set is small.

The last line of CHECKDB names a minimum repair level. That is a statement about the most severe error found, not a recommendation. Microsoft’s position is that restoring from the last known good backup is the primary method and repair is an emergency last resort.

If CHECKDB is clean after the restore you are done. If not, the next section explains what the check is comparing and which of these codes means what.

Why it happens

Every 8 KB page carries a header that names the file and page it believes it is, the allocation unit it belongs to, and a checksum. Alongside the pages, SQL Server keeps allocation maps: GAM and SGAM track which extents are in use, PFS tracks free space for each page, and every allocation unit has an IAM chain listing the extents it owns. DBCC CHECKDB reads both sides and cross-checks them, and the codes in this family tell you which side of that comparison broke.

8909’s published text is precise and worth reading literally: the page identified in the message “contains an incorrect page ID in its page header”, and the message prints the page ID the header claims. That is a page that does not know where it lives. It is not the same complaint as an allocation-map disagreement, which is what 8905 and 2533 report, and the distinction matters because it changes what you look at underneath.

A query cannot produce any of this. A storage stack that returned stale, mis-addressed or partially written data can, and usually did. Host snapshots taken without quiescing the file system, a failing controller write cache, a firmware bug, or a filter driver that mishandled a write are the usual origins. The related codes narrow the scope: 8905 is an extent marked allocated in the GAM that no SGAM or IAM claims, 2533 a page allocated to an object and never reached through it, 8939 and 8944 internal tests failing on a page and on a single row, and 8928 a page CHECKDB could not process at all with the reason in the other errors.

The storage path damaged the pages

You have this one if The Windows System event log shows disk, HBA, multipath or controller entries near the first failure, or several databases on the same volume report errors together.

  1. Read Event Viewer, Windows Logs, System around the first failure and give the timestamps to whoever owns the storage.
  2. Confirm page verification is on: SELECT name, page_verify_option_desc FROM sys.databases; and set ALTER DATABASE [MyDb] SET PAGE_VERIFY CHECKSUM; if it is not.
  3. List the filter drivers in the path with fltmc filters, and exclude database files from real-time antivirus scanning.
  4. Move the database to healthy storage before restoring into it. Restoring onto the volume that caused the damage tends to reproduce it.

PAGE_VERIFY CHECKSUM only protects pages written after you enable it. Existing pages gain a checksum the next time they are written.

Only a nonclustered index is damaged

You have this one if Every reported error names the same object and an index ID of 2 or higher, and the base table reads correctly.

  1. Resolve the IDs: SELECT OBJECT_NAME(object_id) AS tbl, name, index_id FROM sys.indexes WHERE object_id = <object_id>;
  2. Rebuild it: ALTER INDEX [IX_Name] ON [dbo].[TableName] REBUILD;
  3. If the rebuild fails because it has to read the damaged page, drop the index and create it again.
  4. Re-run CHECKDB and confirm the errors have gone.

This is the one class you can fix without losing anything, because a nonclustered index holds nothing that is not derivable from the base table.

You have a backup that predates the corruption

You have this one if A full backup, and the log chain since, restore and verify cleanly on another instance.

  1. Restore the candidate to a spare instance first and run CHECKDB there, to prove that copy is clean before you touch production.
  2. If only a handful of pages are involved, restore those pages rather than the whole database.
  3. Take a tail-log backup so you keep committed work since the last log backup, then restore and apply the chain in order.
RESTORE DATABASE [MyDb] PAGE = '1:29551, 1:29552'
  FROM DISK = N'D:\Backup\MyDb_full.bak' WITH NORECOVERY;

RESTORE LOG [MyDb] FROM DISK = N'D:\Backup\MyDb_log_01.trn' WITH NORECOVERY;

BACKUP LOG [MyDb] TO DISK = N'D:\Backup\MyDb_tail.trn';
RESTORE LOG [MyDb] FROM DISK = N'D:\Backup\MyDb_tail.trn' WITH RECOVERY;

Page restore runs online only in Enterprise edition; elsewhere the database is offline for it. Page numbers come from the CHECKDB output and from msdb.dbo.suspect_pages. If 8905 or 2533 dominate, a full restore is the only clean answer, because allocation structures cannot be page-restored.

There is no usable backup and repair is all that is left

You have this one if Every backup you hold fails RESTORE VERIFYONLY or already contains the same errors.

  1. Keep the triage backup, so you can start again if repair makes things worse.
  2. ALTER DATABASE [MyDb] SET SINGLE_USER WITH ROLLBACK IMMEDIATE; The database must be in single-user mode for any repair option.
  3. Run DBCC CHECKDB (N'MyDb', REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS, ALL_ERRORMSGS; and keep the output as the record of what was deleted.
  4. ALTER DATABASE [MyDb] SET MULTI_USER; then run DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS; and reconcile row counts with the application.

After a repair, plan a migration into a freshly created database rather than living in the repaired one. Script the schema, copy the data, check it.

Full reference

Reading the output to work out how bad it is

What the output shows What it means for you
Every error carries the same index ID, above 1 Damage is confined to a nonclustered index; a rebuild clears it
Errors on index ID 0 or 1 The heap or clustered index is damaged. Real data loss; restore
8905, 2533, or errors naming GAM, SGAM, PFS or IAM Allocation metadata is inconsistent. Page restore cannot help, because allocation pages cannot be page-restored
Errors in tempdb only Nothing to recover. Restart the instance and tempdb is recreated
Different pages on each run A live memory or storage fault, not fixed damage

Every code in this family, in Microsoft’s own words

Code Published message, shortened Where the disagreement is
8909 Page ID contains an incorrect page ID in its page header. The PageId in the page header = … Inside the page header
8905 Extent is marked allocated in the GAM, but no SGAM or IAM has allocated it Between the allocation maps
2533 Page allocated to object … was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header Between the IAM chain and the page
8928 Page could not be processed. See other errors for details Nowhere yet: read the other errors
8939 Test (…) failed. Values are x and y, on a page An internal invariant on a page
8944 Test (…) failed. Values are x and y, on a page and row The same, located to one row

How CHECKDB gets its consistent view, and when it does not

DBCC CHECKDB uses an internal database snapshot for the transactional consistency it needs, which is what lets it run without blocking users. That is the normal case and it is why the command is safe to schedule. But it is not unconditional: Microsoft documents that if the snapshot cannot be created, or if you specify TABLOCK, CHECKDB acquires locks instead, including a short-term exclusive lock on the database for the allocation checks and shared table locks for the table checks.

TABLOCK has a second consequence worth knowing before you put it in a maintenance job. It limits the checks performed: DBCC CHECKCATALOG is not run, and Service Broker data is not validated. A nightly job carrying TABLOCK has therefore never checked the system catalogue at all, which is how catalogue damage goes unnoticed for months.

Repair, and what Microsoft actually says about it

  • REPAIR_REBUILD carries no possibility of data loss and fixes only what can be fixed that way.
  • REPAIR_ALLOW_DATA_LOSS clears certain errors by deallocating a row, a page or a series of pages, and Microsoft states plainly that any deallocated data is no longer accessible or recoverable.
  • Microsoft’s own recommendation is that a restore from the last known good backup is the primary method, and that REPAIR_ALLOW_DATA_LOSS is not an alternative to it but an emergency last resort for when restoring is not possible.
  • The database must be in single-user mode for any of the repair options.
  • Repair does not restore referential integrity. Run DBCC CHECKCONSTRAINTS afterwards and reconcile with the application.

Keeping the window short

Almost everything that makes this error expensive is a question of how long it went unnoticed. Corruption found within a day is often a page restore against a backup you still hold. Corruption found within a year means every backup in retention already contains it, and the only route left is the one that loses rows. Schedule CHECKDB, alert on its failure, keep PAGE_VERIFY on CHECKSUM, back up WITH CHECKSUM, and retain history long enough that a clean copy still exists when a problem surfaces late.

Every code this article covers

Code What it points at Source
8909 Table error: the page contains an incorrect page ID in its page header, and the message prints the ID the header claims Microsoft Learn
8928 Object, index and allocation unit named: the page could not be processed. See the other errors for the reason Microsoft Learn
8939 Table error on a page: an internal test failed, and the message names the test and the two values that disagreed Microsoft Learn
8944 The same internal test failure located to a single row within a page Microsoft Learn
2533 A page allocated to an object was not seen. The page may be invalid or may carry an incorrect allocation unit ID in its header Microsoft Learn
8905 An extent is marked allocated in the GAM, but no SGAM or IAM has allocated it Microsoft Learn

Confirm the fix worked

  1. Run DBCC CHECKDB (N'MyDb') WITH NO_INFOMSGS, ALL_ERRORMSGS; and confirm it returns no errors at all.
  2. Query msdb.dbo.suspect_pages and confirm no new entries are appearing.
  3. Take a fresh full backup WITH CHECKSUM and confirm RESTORE VERIFYONLY ... WITH CHECKSUM passes against it.
  4. If you had to repair, run DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS; and reconcile row counts with the application.
  5. Confirm your scheduled consistency check does not use TABLOCK, so that CHECKCATALOG is actually being run.

Questions people ask about this

Is there a licence or tool I can buy that fixes 8909?

No, and be sceptical of anything sold on that claim. The bytes on the damaged pages are gone and no product recovers what is not there. Money buys prevention: storage that does not corrupt data, and backups that leave you a clean copy. Fixing this costs nothing but time.

Can I run DBCC CHECKDB while users are working?

Normally yes. It uses an internal database snapshot for consistency, so it does not block. But if the snapshot cannot be created, or if you specify TABLOCK, it takes locks instead, including a short exclusive database lock. It also generates heavy read I/O either way, so schedule it for a quiet window.

The minimum repair level says REPAIR_ALLOW_DATA_LOSS. Should I run it?

That line reports the most severe error found; it is not a recommendation. Microsoft’s guidance is that restoring from the last known good backup is the primary method and that this option can lose more data than a restore would. Exhaust every restore option first.

Why can I page-restore an 8909 but not an 8905?

Because page restore only handles database pages. Allocation pages, which is what GAM, SGAM and PFS are, are explicitly excluded, along with the transaction log, page 0 of each file, page 1:9 and full-text catalogues. Allocation damage means a full restore.

How do I stop this happening again?

Run CHECKDB on a schedule so damage is found in days rather than months, keep PAGE_VERIFY set to CHECKSUM, back up WITH CHECKSUM, and retain enough history that a clean copy still exists when a problem surfaces late.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix SSIS Error 0xC02020A1: Data Conversion and Truncation Failures in a Data Flow License Error Error 3967: Insufficient Space in tempdb to Hold Row Versions Free Fix Setup Error 0x84B10001: SQL Server Installation Fails Before It Starts License Error Error 701: Insufficient System Memory on a Memory-Capped SQL Server Edition
โ† Back to Knowledge Base