2

I have some data corruption and was not able to restore the data via backups. It was affecting mainly non-clustered indexes, so after drop-create of the indexes the issues were resolved.

Finally, I have:

Msg 8905, Level 16, State 1, Line 3 Extent (1:896320) in database ID 15 is marked allocated in the GAM, but no SGAM or IAM has allocated it. CHECKDB found 1 allocation errors and 0 consistency errors not associated with any single object. CHECKDB found 1 allocation errors and 0 consistency errors in database 'db_name'. repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (db_name).

I want to find which are the extent pages and then to see what's the data in these pages. Then, to decide to run the CHECHDB command with repair_allow_data_loss or save some data if possible.

1

1 Answer 1

4

I want to find which are the extent pages [...]

It tells you in the error, Extent (1:896320), so from page 1:896320 to 1:896327.

The thing here is that you have an allocation error where the extent is marked as allocated but no other structure shows it as such. Is it really part of something? Is is not?

[...] and then to see what's the data in these pages.

I get where you're coming from, however, it's unknown when the pages are from. This could have been something that happened a while ago and it's just being noticed, so let's say for argument sake that there is data there. Is it from 6 months ago? Yesterday? You're really not going to know. What if it's part of a text tree? The point is that the only safe thing to do is generally deallocate the extent. No other allocation structures are claiming it and you don't know when it's from.

2
  • 1
    Thanks. I have checked the pages and really I am not able to understand there data. Also, the DBCC PAGE is not able to extract the row data. Last question - is there a command to deallocate only this extent and not running the DBCC CHECKDB which is slow?
    – gotqn
    Oct 19, 2021 at 11:43
  • CheckDB is the way to go @gotqn - it takes time to run because it's checking the facts of the database. Oct 19, 2021 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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