Fix it now
605 says a page was fetched and belongs to a different allocation unit than the one that asked for it. Microsoft documents two severities with opposite meanings: 21 is genuine corruption, 12 is a transient error in cache with no disk damage. Read the severity before you do anything else.
EXEC sys.sp_readerrorlog 0, 1, N'605';
- Severity 12 means transient. Microsoft names two causes: a query using NOLOCK or READ UNCOMMITTED, and the operating system telling SQL Server an I/O completed before it had. Re-run the query without the hint and it will normally succeed.
- Severity 21 means treat it as corruption. Take the two allocation unit IDs from the message and resolve them to objects, then run
DBCC CHECKTABLEon the object owning the second ID. - Follow that with
DBCC CHECKDB (N'MyDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;to find the full extent. - Check
msdb.dbo.suspect_pagesand the Windows System event log for storage errors at the same time. - If CHECKDB reports errors, restore from the last clean backup, or restore just the affected pages. Do not open with a repair option.
If CHECKDB comes back clean and the error only ever appears under a dirty read, you have your answer. Remove the hint from that query and stop looking for corruption.
If the severity was 12 and CHECKDB is clean, you are finished. If it was 21, the next section explains what the check is and why the same number means two opposite things.
Why it happens
When SQL Server reads a page it compares the object and allocation unit recorded in the page header against the one it was looking for. If they disagree the read is abandoned and 605 is raised, with both allocation unit IDs printed in the message: the first is the ID found in the page header, the second is the ID associated with the table that asked. That check is a safety net, and it fires for any reason the two can disagree, which is why one number covers two entirely different situations.
At severity 21 the page header genuinely disagrees with the allocation structures on disk. Microsoft names the possibilities: a damaged page chain, a corrupt IAM, or an invalid entry in the sys.objects catalog view, and attributes them most often to hardware or a disk device driver failure. The connection is terminated. This is the same class of problem as 8909 and it needs the same response.
At severity 12 nothing is damaged. Microsoft documents two causes. The first is a scan reading without shared locks, under NOLOCK or READ UNCOMMITTED, that arrives at a page which has legitimately changed owner since the scan began. The second is the one almost every article omits: the operating system notified SQL Server that an I/O operation had completed before it actually had. That second cause is not a query problem at all, and it points at the I/O path. Either way the connection continues, and re-running the query later, or a clean CHECKDB, tells you the 605 was transient.
The companion codes divide along the same line. 601, “Could not continue scan with NOLOCK due to data movement”, is severity 12 and is the dirty-read complaint in its plainest form. 7105, about a missing large-object node, carries Microsoft’s own sentence: this is usually caused by transactions that can read uncommitted data on a data page. On the other side, 5180 is an invalid file control block reference at severity 22, 2511 is keys stored out of order on a page, and 8646 reports an index entry that could not be found, which the message says is either index corruption or a problem with the current update plan.
A dirty read caught data being moved
You have this one if Severity 12, the query used NOLOCK or the session was in READ UNCOMMITTED, and the same query succeeds on a retry. 601 or 7105 often appear alongside.
- Re-run the query without the hint and confirm it completes.
- Remove NOLOCK from reports that must not fail. It does not make queries correct, it only makes them unblocked.
- If the goal was avoiding blocking, use read committed snapshot isolation instead:
ALTER DATABASE [MyDb] SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE; - Run CHECKDB once anyway, so you can rule corruption out rather than assume it away.
Enabling read committed snapshot isolation needs exclusive access for a moment and shifts row versioning load onto tempdb. Size tempdb before you turn it on.
The I/O path reported a read complete before it was
You have this one if Severity 12, and no NOLOCK or READ UNCOMMITTED anywhere near the failing query.
- Treat it as an I/O finding rather than a query finding. Check the Windows System event log for the same minute.
- Review filter drivers with
fltmc filters, and update storage drivers and firmware. - Run CHECKDB to confirm nothing was actually damaged.
- Watch for 823, 824 or 825 entries in the SQL Server error log, which would confirm the path is unhealthy.
Genuine page-level corruption
You have this one if Severity 21, reproducible against the same object, and CHECKDB reports 605 or its 89xx relatives.
- Take a copy-only backup of the damaged database before anything else, with
WITH CONTINUE_AFTER_ERRORif a normal backup refuses. - Resolve the allocation unit IDs from the message to objects, then run
DBCC CHECKTABLEon the table owning the second ID. - Restore the newest backup that passes
RESTORE VERIFYONLYto a spare instance and run CHECKDB there to prove it is clean. - Take a tail-log backup of the damaged database, then restore full, differential and log backups in order. Use page restore if only a few pages are involved.
- Investigate the storage path before returning the database to service, or you will be back.
Index-level damage a rebuild can clear
You have this one if 8646 or 2511 appear and every reported error names a nonclustered index rather than index ID 0 or 1.
- Resolve the names:
SELECT OBJECT_NAME(object_id) AS tbl, name, index_id FROM sys.indexes WHERE object_id = <object_id>; - Drop the index and create it again. A plain rebuild may fail because it has to read the damaged structure.
- Re-run CHECKDB to confirm the errors cleared.
- If they return within days, the storage is still faulty and the rebuild is only masking it.
8646’s message names two possibilities, not one: the index is corrupt, or there is a problem with the current update plan. If CHECKDB is clean, look at the plan rather than the disk.
Full reference
Telling the two apart in practice
| What you observe | Where the fault is |
|---|---|
| Severity 12, under NOLOCK or READ UNCOMMITTED | No damage. The reader saw a page mid-move |
| Severity 12, no dirty read involved | The I/O path reported a read complete early. Check drivers and the event log |
| Severity 21, connection terminated | Real page-level corruption. Treat it as an 8909 |
| 605 repeats on the same object every time it is read | Corruption. CHECKDB will confirm it |
| 605 with 7105 or 601 | Dirty reads. Microsoft names uncommitted reads as the usual cause of 7105 |
| 605 with 5180 | An invalid file control block reference at severity 22. Verify the file layout, then run CHECKDB |
| 605 across several databases on one volume | Storage, not SQL Server |
Resolving the allocation unit IDs in the message
Both IDs in a 605 message can be resolved to objects, and Microsoft’s own user action starts here rather than with CHECKDB. Run this in the affected database, substituting the two values from the error.
USE [MyDb];
GO
SELECT au.allocation_unit_id,
OBJECT_NAME(p.object_id) AS table_name,
fg.name AS filegroup_name,
au.type_desc AS allocation_type,
au.data_pages,
p.partition_number
FROM sys.allocation_units AS au
JOIN sys.partitions AS p ON au.container_id = p.partition_id
JOIN sys.filegroups AS fg ON fg.data_space_id = au.data_space_id
WHERE au.allocation_unit_id IN (<first_id>, <second_id>)
ORDER BY au.allocation_unit_id;
The second ID is the one associated with the table that made the request, so that is the object to run DBCC CHECKTABLE against first. Only then widen to a full CHECKDB to establish the extent of the damage.
Every code here, and which side of the line it sits on
| Code | Severity | Side |
|---|---|---|
| 605 | 21 or 12 | Both. The severity is the whole diagnosis |
| 601 | 12 | Dirty read: could not continue scan with NOLOCK due to data movement |
| 7105 | 22 | Usually dirty read. Microsoft’s text names transactions that can read uncommitted data as the usual cause, and DBCC CHECKTABLE as the action |
| 8646 | 21 | Either: the index is corrupt, or there is a problem with the current update plan |
| 2511 | 16 | Corruption: keys out of order on a page |
| 5180 | 22 | Corruption or a file layout problem: invalid file ID for a file control block |
What NOLOCK is actually costing you
605 and 601 are the visible failures, and they are the least of it. Reading without shared locks can return the same row twice, skip rows entirely, and show values from transactions that later rolled back. None of those raises an error; they just produce a wrong number in a report. Snapshot-based isolation gives you the non-blocking behaviour without those effects, at the cost of version store space in tempdb.
When the file layout is the problem rather than the pages
- List what the database actually has:
SELECT file_id, name, physical_name, state_desc FROM sys.database_files; - Confirm every file is ONLINE and present at the recorded path.
- If a file was moved, or a filegroup was restored partially, complete the restore sequence rather than leaving the database half-recovered.
- 5180’s own message says to verify the file location and then execute DBCC CHECKDB, in that order.
- Metadata errors that survive a correct file layout need a restore, not a repair.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
605 |
Attempt to fetch a logical page failed: it belongs to one allocation unit and not the one that requested it. Severity 21 is corruption; severity 12 is transient | Microsoft Learn |
601 |
Could not continue scan with NOLOCK due to data movement. Severity 12 | Microsoft Learn |
5180 |
Could not open File Control Block for an invalid file ID in the database. Verify the file location, then execute DBCC CHECKDB. Severity 22 | Microsoft Learn |
7105 |
The page and slot for a LOB data type node does not exist. Microsoft’s text says this is usually caused by transactions that can read uncommitted data, and the action is DBCC CHECKTABLE | Microsoft Learn |
8646 |
Unable to find an index entry. The indicated index is corrupt, or there is a problem with the current update plan. Severity 21 | Microsoft Learn |
2511 |
Table error: keys out of order on a page, with the two slot numbers named. Severity 16 | Microsoft Learn |
Confirm the fix worked
- Run
DBCC CHECKDB (N'MyDb') WITH NO_INFOMSGS, ALL_ERRORMSGS;and confirm a clean result. - Re-run the query that failed, without any NOLOCK hint, and confirm it completes.
- Search the error log for further occurrences:
EXEC sys.sp_readerrorlog 0, 1, N'605';and check the severity on each. - Confirm
msdb.dbo.suspect_pagesis not gaining new rows over the following days. - If the severity was 12 with no dirty read involved, confirm no new 823, 824 or 825 entries appear either.
Questions people ask about this
Does buying a newer version or a higher edition make 605 go away?
No. If the pages are damaged, the data on them is gone regardless of edition. A higher edition buys online page restore, which shortens the outage during recovery, but it recovers nothing a lower edition cannot. There is no purchase that fixes this.
Is NOLOCK safe if I accept occasional errors?
It is safe for durability and not for correctness. Beyond 605 and 601, dirty reads can return rows twice, skip rows entirely, and show uncommitted values that were later rolled back. Snapshot-based isolation gives you the non-blocking behaviour without those effects.
I got a severity 12 and there is no NOLOCK anywhere. What now?
That is Microsoft’s second documented cause: the operating system told SQL Server an I/O had completed before it had. Treat it as an I/O finding. Check the System event log, the filter drivers and the storage firmware, and run CHECKDB to confirm nothing was damaged.
CHECKDB is clean but 605 appeared once last week. What now?
If it was severity 12, nothing is wrong. Note the query and remove the hint, or investigate the I/O path if there was no hint. If it was severity 21 and CHECKDB is now clean, something already replaced the page – a restore or an index rebuild – and you should still investigate the storage.
Can I trust a backup taken from a database reporting 605?
Only as a triage copy. A backup faithfully copies the damaged pages. Verify with RESTORE VERIFYONLY and run CHECKDB on a restored copy before you count any backup as clean.
