Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
1  
So it was a heap with a single non-clustered index? Do all queries fail, or only ones that request data from that specific page? Have you looked at the page using 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:50
1  
Its says that the PFS (Page Free Space) page has corruption. You can examine PFS pages using DBCC 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 the Attempt to fetch logical page (1:8687634) in database 7 failed. ? Also what patch level of 2008R2 are you running ? –  Kin Feb 24 at 17:01
    
@Kin the msg is 605, level 21, state 3, line 1. I have SP1 right now but I'm downloading SP2. –  Dean MacGregor Feb 24 at 19:27
    
@AaronBertrand it was a clustered index. Not all queries fail like if I just do select top 5 * from 'table' that will work. I haven't looked at DBCC 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 run dbcc 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
1  
@DeanMacGregor kb 2015739 will help you. Please update your post with exact error. –  Kin Feb 24 at 19:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.