Share via


how to correctly restore page ERROR (data-corruption)

Question

Wednesday, October 26, 2016 1:14 PM

hi All, i executed dbcc checkdb ('yout_Database') and

result is as following:

Msg 2533, Level 16, State 2, Line 1
Table error: page (1:11760) allocated to object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594046578688 (type LOB data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594046578688 (type LOB data). The off-row data node at page (1:11760), slot 1, text ID 5424095232000 is referenced by page (1:1374), slot 0, but was not seen in the scan.
Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594046578688 (type LOB data). The off-row data node at page (1:11760), slot 3, text ID 5424095297536 is referenced by page (1:1374), slot 1, but was not seen in the scan.
Msg 8965, Level 16, State 1, Line 1
Table error: Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594046578688 (type LOB data). The off-row data node at page (1:11760), slot 4, text ID 5424095363072 is referenced by page (1:1374), slot 2, but was not seen in the scan.
Msg 8929, Level 16, State 1, Line 1
Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594052149248 (type In-row data): Errors found in off-row data with ID 5424095232000 owned by data record identified by RID = (1:1374:0)
Msg 8929, Level 16, State 1, Line 1
Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594052149248 (type In-row data): Errors found in off-row data with ID 5424095297536 owned by data record identified by RID = (1:1374:1)
Msg 8929, Level 16, State 1, Line 1
Object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594052149248 (type In-row data): Errors found in off-row data with ID 5424095363072 owned by data record identified by RID = (1:1374:2)
CHECKDB found 0 allocation errors and 7 consistency errors in table 'Some_table' (object ID 1637580872).
CHECKDB found 0 allocation errors and 7 consistency errors in database 'your_Database'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (your_database).

I decided to perform the dbcc checkdb becos i seen the below msg from the error logs:

The Database ID 23, Page (1:11760), slot 1 for LOB data type node does not exist. This is usually caused by transactions that can read uncommitted data on a data page. Run DBCC CHECKTABLE.

This error started off since last 14th Oct till now. Guess the subsequent backup from 14th Oct onwards cannot be use for the restoration ? Since only 1 page is affect can i use the backup of 13th Oct to restore the corrupted page? I am not too sure what impact or consistency problem if i were to use the last gd backup which is 13th Oct. The corrupted page seem to be reference by page (1:1374) which i think is up-to-date (26th Oct) . The doubt here is can i still use 13th Oct to just restore the corrupted page 1:11760 ?

All replies (3)

Wednesday, October 26, 2016 1:30 PM

is this the enterprise edition of SQL Server - you might be able to do restore page:

https://www.brentozar.com/archive/2014/11/differences-offline-online-page-restores/

You will likely need to do a dbcc checkdb('DatabaseName', repair)

and if that does not fix it try a dbcc checkdb('DatabaseName',REPAIR_REBUILD)

or even a dbcc checkdb('DatabaseName',REPAIR_Repair_Allow_Data_Loss)

the 3rd option will likely entail some data loss.

It looks like your table is a large one. It further looks like your clustered index or primary key is problematic.

You might want to try to drop this  index and recreate it. I like to bcp the data to the file system before doing this so I have a record of it.

Finally try the steps mentioned here:

https://www.mssqltips.com/sqlservertip/2871/troubleshooting-and-fixing-sql-server-page-level-corruption/


Thursday, October 27, 2016 9:19 AM

Hi delenne,

As mentioned by Hilary, we can use dbcc checkdb to try to fix it.

In your scenario, if you have the full backup in 13th and the continuous sequence of log backups, you can use them to restore by following steps below. A continuous sequence of log backups is called a log chain which starts with the first full backup of the database.

1.    Restore the full backup and log in the .bak file in 13th with norecovery model, we can select RESTORE WITH NORECOVERY in the recovery state when we do the restore operation.
2.    Restore the log file in the .bak in 14th with recovery model.

Best Regards,
Teige


Thursday, October 27, 2016 9:40 AM

The clue is here..

            

Msg 2533, Level 16, State 2, Line 1
Table error: page (1:11760) allocated to object ID 1637580872, index ID 1, partition ID 72057594046054400, alloc unit ID 72057594046578688 (type LOB data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.

Try rebuilding the Indexes for this Table...

Please click "Mark As Answer" if my post helped. Tony C.