Thursday, August 18, 2011

5 Easy steps to fix SQL Database Corruption Error in MS SQL Server database

Are you facing sql database corruption error messages, when you work on MS SQL Server database? The SQL database corruption occurs due to several reasons such as virus infections, software corruption, improper system shutdown, Hardware malfunctioning etc. In such instances, user should be use in-built SQL repair inbuilt utilities.

Take a live example of an error message that occurs after SQL database corruption

“Table error: Page P_ID, slot S_ID, column C_ID is not a valid complex column.”

The error code of this error message is Error 8960 which occurs due to several reasons.

Some main causes of this issue are:
  • SQL database corruption
  • Table records get corrupt
  • hardware corruption issues
5 main keys to resolve this error message:

1. Run DBCC CHECKDB: First run  DBCC CHECKDB command to check database errors. If DBCC CHECKDB reports database corruption error then correct it immediately otherwise you lost your data.

2. Use DBCC CHECKTABLE command to repair corrupt table records:
   DBCC CHECKTABLE ('tablename', REPAIR_ALLOW_DATA_LOSS)

3. Correct hardware-related corruption issues by performing the following actions:
  • First check the error logs in MS SQL Server to verify if there is any hardware corruption or not.
  • Swapping the hardware components to check the actual cause of sql database corruption.
  • Reinstalling the OS after formatting the hard disks.

4. Restore corrupt SQL database from updated backup: If the problem is not hardware-related then you should restore your corrupt database from updated backup.

5. If you are still getting the same error message the you should try  Third-party SQL Database Recovery Software to repair corrupt SQL database. These software repairs corrupt mdf files as well as ndf files.

4 comments:

  1. Good info. Thanks a lot! Saved my database.

    ReplyDelete
  2. Congratulations! Glad to hear that you got it sorted out.

    ReplyDelete
  3. I tried what Adam Gorge had described and it perfectly worked for me – many many thanks

    ReplyDelete