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.

My database is in simple recovery mode. One page got corrupted and I only have backups created using simple backup.

When I run this:

DBCC PAGE ('myDB', 1, 952663, 3)

I get:

DBCC PAGE error: Invalid page type - dump style 3 not possible.

SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:952663; actual 2668:-1594740640). It occurred during a read of page (1:952663) in database ID 5 at offset 

Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 332114207834112 (type Unknown), page ID (1:952663) contains an incorrect page ID in its page header. The PageId in the page header = (2668:-1594740640).
CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.
Msg 8928, Level 16, State 1, Line 1
Object ID 1131971209, index ID 1, partition ID 72057595034861568, alloc unit ID 72057595204796416 (type In-row data): Page (1:952663) could not be processed.  See other errors for details.
Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 1131971209, index ID 1, partition ID 72057595034861568, alloc unit ID 72057595204796416 (type In-row data). Page (1:952663) was not seen in the scan although its parent (1:1616550) and previous (1:2296409) refer to it. Check any previous errors.
Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 1131971209, index ID 1, partition ID 72057595034861568, alloc unit ID 72057595204796416 (type In-row data). Page (1:1743775) is missing a reference from previous page (1:952663). Possible chain linkage problem.
Msg 2511, Level 16, State 1, Line 1
Table error: Object ID 1131971209, index ID 25, partition ID 72057595034796032, alloc unit ID 72057595204730880 (type In-row data). Keys out of order on page (1:3474431), slots 237 and 238.
CHECKDB found 0 allocation errors and 4 consistency errors in table 'TransactionEntry' (object ID 1131971209).
CHECKDB found 0 allocation errors and 5 consistency errors in database 'DsPointOfSale'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (DsPointOfSale).

Can I still repair this database?

share|improve this question
    
You can't use RESTORE DATABASE ... PAGE. Have you seen the "manual" method described here already?. Have you restored any of your simple backups and tested that the page is not corrupted there? How confident are you that the content on that page will even be the same in your backups? –  Martin Smith Mar 19 '12 at 22:14
    
I saw it I don't know how to do it –  Ezi Mar 19 '12 at 22:16
1  
Have you tried running DBCC CHECKDB ('YourDB') WITH ALL_ERRORMSGS to see if (a) Any other pages affected (b) it tells you the object affected? –  Martin Smith Mar 19 '12 at 22:39
1  
You could try DBCC CHECKDB ('YourDB') WITH TABLOCK, ALL_ERRORMSGS, NO_INFOMSGS; as per here –  Martin Smith Mar 19 '12 at 22:48
1  
You could also do DBCC PAGE with style 3 on the parent page 1:1616550 or next and previous pages in the broken DB (1:2296409 and 1:1743775) so you know the specific clustered index key range that is affected to narrow down the data to look at in the restored DB. –  Martin Smith Mar 20 '12 at 6:58
show 19 more comments

1 Answer 1

up vote 3 down vote accepted

So it is the clustered index affected. If it was me I'd probably try DBCC PAGE ('myDB', 1, 952663, 2); on both the restored backup and the broken DB first to see and compare in Winmerge to see if I could infer anything from that (e.g. if both very similar but just some corruption in the page header then you could use DBCC with style 3 on the restored DB to get a good idea of specific rows to restore after REPAIR_ALLOW_DATA_LOSS. Otherwise you'll just need to do a data compare between the two tables and try and see if you can figure out rows that need restoring that way. – Martin Smith

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.