Corrupted Tables

  • Hello Masters,

    Our SQL Server 2012 STD 64 bit STD edition are in cluster and databases used for Sharepoint Apps. Last week Sharepoint team found some errors in cluster as Error-Events in the Application log. Most of them with The handle is invalid.

    Upon investing I found one of the table was corrupted (Logical consistency error) with Sharepoint Database, after confirming with client we repair the table with data loss (We took backup before activity). Now table is up and running fine without any corruptions.

    Now the questions came from the client "whats the reason for table corruption?" to prevent such disaster in future. I checked the event logs and SQL Server logs :

    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xfacb6aaa; actual: 0x9f6b18ec). It occurred during a read of page (1:39510) in database ID 18 at offset 0x000000134ac000 in file.

    According to me it was Disk I\O error. But what causes it ? What are the other parameters which can corrupt Databases\Tables ? How can we check that ?

    And last question, how can we prevent such corruption ?

  • Usually, most of the time, corruption is due to something wrong in the IO subsystem. That's everything from filter drivers right down to the disks, so there's lots of moving parts.

    Make sure you're running CheckDB frequently, make sure you have your backup strategy tested and working. Repair is usually a last resort, repair_allow_data_loss, as the option clearly says, allows for data to be lost. With Sharepoint where the structure of the site is stored in the database, data loss could result in your entire site no longer working.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • jitendra.padhiyar (3/2/2015)


    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0xfacb6aaa; actual: 0x9f6b18ec). It occurred during a read of page (1:39510) in database ID 18 at offset 0x000000134ac000 in file.

    According to me it was Disk I\O error. But what causes it ? What are the other parameters which can corrupt Databases\Tables ? How can we check that ?

    Generally speaking, physical corruption can be due to faulting disks or faulting RAM modules.

    And last question, how can we prevent such corruption ?

    You cannot, but you can check for corruption before taking backups. Here's my script to perform those checks and get an alert in your mailbox if errors are found:

    Setting up an e-mail alert for DBCC CHECKDB errors[/url]

    -- Gianluca Sartori

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply