Backup with Checksum Show No Issues, While DBCC CHECKDB Reports Errors

  • I took a backup with the CHECKSUM option, which was successful and showed no errors. However, when I restored the same backup, it showed DBCC CHECKDB errors.

    I want to understand why the checksum did not detect any issues, but DBCC CHECKDB did. What are the issues that a checksum will not detect but DBCC CHECKDB can identify?

    What types of errors or issues are not detected by a checksum?

     

  • What errors did checkdb report?

    how often do you run dbcc checkdb on your databases?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" ๐Ÿ˜‰

  • I could be mistaken, but I thought the whole point of backup with checksum meant that the backup would contain a checksum in it for validation of the backup. Basically, it says that the backup matches the system. It does NOT mean that the backup contains no errors. If DBCC CHECKDB says there are errors in the backup file, it is likely going to tell you the same thing on the source system. You have a backup of the bad data. The backup was successful and matches production. The Checksum on the backup tells you the backup and source are in the same state.

    The reason you want to do the checksum with a backup is you want to make sure the backup matches the source. IF you have disk failure, memory failure, or any "bits flipping", the checksum will tell you the backup doesn't match the source so you know there is possible hardware failure.

    The above is all just my opinion on what you should do.ย 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.ย  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Paul Randal details backup with checksum on this blog

    https://www.sqlskills.com/blogs/paul/a-sql-server-dba-myth-a-day-2730-use-backup-with-checksum-to-replace-dbcc-checkdb/

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" ๐Ÿ˜‰

  • Backup only takes the pages as is and calculates a checksum based on that data.

    Checkdb actually checks it all.

    on top of that:ย  What's the page_verify option set for your db ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution ๐Ÿ˜€

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Perry Whittle wrote:

    What errors did checkdb report?

    how often do you run dbcc checkdb on your databases?

    Hi,

    we check our databases every day with dbcc. If you got an error, it will maybe easy to fix the error on the first day. If the error occours for 30 days, maybe more data is lost.

    Kind regards,

    Andreas

  • andreas.kreuzberg wrote:

    Perry Whittle wrote:

    What errors did checkdb report? how often do you run dbcc checkdb on your databases?

    Hi,

    we check our databases every day with dbcc. If you got an error, it will maybe easy to fix the error on the first day. If the error occours for 30 days, maybe more data is lost.

    Kind regards,

    Andreas

    happy to help but my question was to the OP

    If you run every day and you get errors on 1 day why would it be left to fester for 30 days is first question

    With regards data loss, it depends on the object_ids and index_ids of the corrupted items. But if you see it on day 1 youโ€™re not going ย to leave it for 30 days.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" ๐Ÿ˜‰

Viewing 7 posts - 1 through 6 (of 6 total)

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