When I run queries from one of my tables I get an error
Msg 605, Level 21, State 3, Line 1
Attempt to fetch logical page (1:8687634) in database 7 failed. It belongs to allocation unit 72057594364821504 not to 72057594052476928.
I did some googling and I found this MSDN article which suggested running DBCC CHECKDB
. I ran the check but it reported 0 allocation errors and 0 consistency errors so I'm not sure where to go from here.
From other sites I saw that the problem might be a corrupted index so I deleted the (only) index of that table and I still get the same error when running a query.
I did DBCC CHECKTABLE
and got
Incorrect PFS free space information for page (1:8687634) in object ID 270624007, index ID 0, partition ID 72057594508083200, alloc unit ID 72057594052476928 (type In-row data). Expected value 50_PCT_FULL, actual value 0_PCT_FULL.
It's not in emergency mode or anything, is there a way to repair/rebuild this table without going into single user mode?
I ran dbcc page(7, 1, 8687634, 3)
with a result of
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
DBCC PAGE
? You might be able to identify the rows stored there, and copy the rest of the data into another table (and manually adding the data from that page). Then drop the old table and rename the new one. – Aaron Bertrand♦ Feb 24 at 16:50DBCC PAGE
. Best is to restore the table as Aaron suggested. BCP out as much data as possible and load it on new table and then drop the old table and rename the new table to the old one. Also, check your storage sub-system. Can you post the message number for theAttempt to fetch logical page (1:8687634) in database 7 failed.
? Also what patch level of 2008R2 are you running ? – Kin Feb 24 at 17:01select top 5 * from 'table'
that will work. I haven't looked atDBCC PAGE
. I googled that and it looks like I need a filenum and pagenum but I don't know which ones to look at. I did rundbcc page(7, 1, 8687634, 3)
and got Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded. – Dean MacGregor Feb 24 at 19:38