When using DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS parameter to repair a corrupt .MDF database, like this:
DBCC CHECKDB(xxxx, ‘REPAIR_ALLOW_DATA_LOSS’)
you see the following error message:
Msg 5028, Level 16, State 4, Line 4
The system could not activate enough of the database to rebuild the log.
DBCC results for ‘xxxx’.
CHECKDB found 0 allocation errors and 0 consistency errors in database ‘xxxx’.
Msg 7909, Level 20, State 1, Line 4
The emergency-mode repair failed.You must restore from backup.
where ‘xxxx’ is name of the corrupt MDF database being repaired.
Msg 5028 error is neither an allocation error or a consistency error.
While Msg 7909 is a severe error that may occurs in many situations whenever SQL Server think the database is beyond recovery.
Screenshot of error message:
The error message(Msg 5028) seems to be related to the LOG file. However, this is a misreport. The actual problem is still caused by the corruption of the MDF database.
You can use our product DataNumen SQL Recovery to recover the data from the corrupt MDF file and solve this error.
Sample corrupt MDF files that will cause the Msg 5028 error:
|SQL Server version||Corrupt MDF file||MDF file fixed by DataNumen SQL Recovery|
|SQL Server 2014||Error3.mdf||Error3_fixed.mdf|