How can I repair a backup of .mdf file database?

Jordan26henderson June 30, 2014
Ads by Google

Hi folks,

One of our clients gets the following error when trying to backup a database:
System.Data.SqlClient.SqlException: SQL Server detected a logical consistency-based I/O error:
incorrect checksum (expected: 0x121db60d; actual: 0x521db60d).
It occurred during a read of page (1:1632) in database ID 4 at offset 0x00000000cc0000 in file
'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBData.mdf'.
Additional messages in the SQL Server error log or system event log may provide more detail.
This is a severe error condition that threatens database integrity and must be corrected immediately.
Complete a full database consistency check (DBCC CHECKDB).
This error can be caused by many factors; for more information, see SQL Server Books Online.
Could not insert a backup or restore history/detail record in the msdb database.
This may indicate a problem with the msdb database.
The backup/restore operation was still successful.


I tried to perform checkdb, checkdb repair_rebuild as well as checkdb REPAIR_ALLOW_DATA_LOSS but none of these corrected the issues is the MSDB database.

My question is: can I just grab a clean MSDB database from another instance to recover corrupt one or do I really have to uninstall/reinstall SQL Server?

  1. Howard B
    July 1, 2014 at 11:11 pm

    Can you connect to the database with something like Database Explorer

    RazorSQL MS SQL Server Database Browser

    Microsoft SQL Server 2008 Management Studio Express

    or ETLTools' Database Browser

    (also available from PortableApps - no install!)

    If you can access the database, you may be able to dump (most) tables to a backup, copy the tables to new tables, dump the database schema, and recreate in a new database without the errors.

    You should probably also do a disk integrity check on the server; CRC errors are common just before a drive fails.