interpreting how much data has been lost by analyzing dbcc output We had a SAN outage and this corrupted several databases with no backups.

We ran this to do a repair:

EXEC sp_resetstatus 'test' 

ALTER DATABASE test SET EMERGENCY 

DBCC CheckDB ('test') 

ALTER DATABASE test SET SINGLE_USER WITH ROLLBACK IMMEDIATE 

DBCC CheckDB ('test', REPAIR_ALLOW_DATA_LOSS) 

ALTER DATABASE test SET MULTI_USER


It ran for approximately 4 hour and generated a huge output:

http://pastebin.com/qXf0DXd4  (very slightly truncated)

Here's a preview:

Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:6769) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).
        The error has been repaired.
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:6770) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).
        The error has been repaired.
Msg 8909, Level 16, State 1, Line 1


1. is this enough info to interpret how much data lose there was?
2. if that's not enough info, can i use the logs to determine how much and WHICH data was lost?
Scanning through the output rather quickly, looks like you lost about 1,045 pages (so 1045 x 8192 bytes). I did this simply by performing a find for "has been deallocated" in the pastebin and seeing how many occurrences of that term were discovered - 1,039. Then I searched for "actual 0:0" and that yielded 6 more pages that weren't found.

No way to guess how many rows that represents. But not sure how that helps you anyway - whether you lost 100 pages or 1,000 pages, or 800 rows or 8,000 rows, what are you going to do with this information?

Whether you can find any more detailed information about the actual data from the transaction log depends on a couple of things, e.g. what recovery model are you in, why were there no backups (because they were on the same drive or because none had ever been taken), and how good are you with a hex editor?