Sample Header Ad - 728x90

What to attempt when REPAIR_ALLOW_DATA_LOSS fails in reparing a corrupted db?

0 votes
2 answers
203 views
I have a corrupted DB, I do not know the cause, it is a DB of an application whose distributor never had this kind of corruption. So I tried DBCC with REPAIR_ALLOW_DATA_LOSS as suggested in: https://stackoverflow.com/questions/22830952/an-inconsistency-was-detected-during-an-internal-operation-in-database/22831143#22831143 but it does not work. What else can I try? I saw that tools that promise DB fix exist (first found in google search https://www.stellarinfo.com/gdc/sql/sql-server-database-repair-tool.php) , but I wonder should I delegate to a blackbox the destiny of my db? Ok I can take a backup of course, but before purchasing in dispair a tool I'd like to ask for more advice. Or these tools simply run DBCC and are therefore useless... This is the type of errors DBCC CHECKDB('My_DB') WITH NO_INFOMSGS, ALL_ERRORMSGSshows shows me (I have many of these) > Msg 8939, Level 16, State 98, Line 7 > Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 3759437827725787136 (type Unknown), page (13558:888026339). > Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 133129 and -14. Trying to repair data loss with ALTER DATABASE TW SET SINGLE_USER WITH ROLLBACK IMMEDIATE; BEGIN TRANSACTION; DBCC CHECKDB ('My_DB', REPAIR_ALLOW_DATA_LOSS); ALTER DATABASE TW SET MULTI_USER; COMMIT; i have: > Msg 8939, Level 16, State 98, Line 3 Table error: Object ID 0, index > ID -1, partition ID 0, alloc unit ID -9222773885349068800 (type > Unknown), page (15657:-1933734559). Test (IS_OFF (BUF_IOERR, > pBUF->bstat)) failed. Values are 2057 and -4. > Repairing this error requires other errors to be corrected first. What can I do? I also realized that querying specific table records i see that some BLOBs are corrupted. Does deleting records solve this kind of pronlems? Thanks!
Asked by user193655 (145 rep)
Feb 19, 2025, 06:01 PM
Last activity: Jun 27, 2025, 10:46 AM