• Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Call Us Today! 512-640-5750
Data Architect as a Service | Remote DBA Services
  • Services
    • Analytics Architecture
    • Database Architecture
    • Software Architecture
    • Microsoft Fabric Consulting
      • Microsoft Fabric Health Check
  • About Us
    • Testimonials
    • Recommendation Program
    • Jobs
      • Data Engineering Consultant
      • Principal Data Analytics Architect
  • Resources
    • Blog
    • Videos
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Angela Tidwell

Validating SQL Server Backups

DBA 101, Disaster Recovery or High Availability
Procure SQL Validating SQL Server Backups

You have your SQL Server Backup Plan and your Database Recovery Model set.  How do you know if your Backups are good? TEST!  Validating SQL Server Backups will ensure that you are in a good place when it is time to bring your database back from the dead!  

Don’t assume that your Backups are solid and let them sit on a shelf.Corrupt backups are recoverable, but worthless. Did we mention you can automate SQL Server Backup validation?

There are several methods for validating your Backups.

    • RESTORE – The most effective way to validate that your backups are good is to run a test Restore.  If your Restore is successful, you have a solid backup.  Make sure to run a test restore on your Full, Differential, Point in Time, and Transaction Logs! Bonus points if you automate refreshing non-production.
  • Backup with CHECKSUM -It may not be realistic to run regular test restores on every single database, this is where CHECKSUM is your friend.  CHECKSUM is part of a backup operation which will instruct SQL Server to test each page being backed up with its corresponding checksum, making sure that no corruption has occurred during the read/write process. If a bad checksum is found, the backup will fail.  If the backup completes successfully, there are no broken page checksum
    • BEWARE though, this does not ensure that the database is corruption free, CHECKSUM only verifies that we are not backing up an already-corrupt database. (Later in this post we discuss checking data for corruption.) If it seems like too much trouble to write a CHECKSUM script every time you want to perform a backup, keep in mind that these can be automated as SQL Agent Jobs! A sample T-SQL script for using CHECKSUM is as follows:


Backup Database TestDB
To Disk='G:DBABackupsTestDBFull_MMDDYYYY.bak'
With CheckSum;

    • VERIFY – It is not wise to rely solely on CHECKSUM, a good addition is to use RESTORE VERIFYONLY.  This will verify the backup header, and also that the backup file is readable.  Note that much like CHECKSUM, this will check to see if there are errors during the read/write process of the backup; however, it will not verify that the data itself is valid or not corrupt.  Despite the name “RESTORE VERIFONLY”, it does not actually restore the data. VERIFY too can be automated to perform each time your backups utilizing CHECKSUM run.
  • CHECKSUM on Restore –  Databases where BACKUP WITH CHECKSUM have been performed can then be additionally verified as part of the restore process. This will check data pages contained in the backup file and compare it against the CHECKSUM used during the backup. Additionally, if available, the page checksum can be verified as well. If they match, you have a winner…
    More Details on CHECKSUM and BACKUP CHECKSUM


Restore Database TestDB;
From Disk='G:DBABackupsTestDBFull_MMDDYYYY.bak'
With VerifyOnly;

Data Validation Prior to Taking Backups

Keep in mind that if your data is corrupt prior to a backup, SQL Server can BACKUP that CORRUPTED DATA.  The validation methods mentioned above guard you against corruption occurring during backups, not against corrupted data within the backup.  For data validation prior to backups being run, it is suggested that DBCC CHECKDB be performed on each database on a regular basis.

  • DBCC CHECKDB –  SQL Server is very forgiving and will usually backup and restore corrupted data. A best practice is to run a DBCC CHECKDB on your data to check for potential corruption. Running CHECKDB regularly against your production databases will detect corruption quickly.  Thus providing a better chance to recover valid data from a backup, or being able to repair the corruption. CHECKDB will check the logical and physical integrity of the database by running these three primary checks*:
      • CHECKALLOC – checks the consistency of the database;
      • CHECKTABLE – checks the pages and structures of the table or indexed view; and
    • CHECKCATALOG – checks catalog consistency.

Automate Validation Steps

Corruption can happen at any time, most of the time it is related to a hardware issue.  Automating the steps necessary to validate your data and backups will help ensure you have the best practices in place to efficiently recover from catastrophic data loss.  Being able to backup and restore is not as important as being able to recover with valid data.Despite the above keys for validation, the only true way to verify that your backups are valid is to actually restore the database. It bears repeating: corrupt backups are recoverable, but worthless. 

*A full list of DBCC CHECKDB checks can be found here.

April 17, 2018/7 Comments/by Angela Tidwell
Tags: backup, Backups, CHECKSUM, DBA, Marketing Database Administrator, Microsoft SQL Server, Recovery, Restores, SQL Server
Share this entry
  • Share on Facebook
  • Share on X
  • Share on X
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://procuresql.com/wp-content/uploads/2018/04/Procure-SQL-Validating-SQL-Server-Backups-1.jpg 564 1090 Angela Tidwell /wp-content/uploads/2024/05/Data-Architecture-as-a-Service-with-ProcureSQL.png Angela Tidwell2018-04-17 16:43:372025-10-14 21:22:29Validating SQL Server Backups
You might also like
Angela Tidwell is our Marketing Database Administrator
A Beginner’s Guide to SQL Server Backups
The Most Important Role of a SQL Server DBA
SQL Server Recovery Models
Should We Compress SQL Server Backups?
Tail Log Backups
Come See Us at Houston TechFest 2017!
SQL Server 2017: Making Backups Great Again!
7 replies
  1. Greg Moore
    Greg Moore says:
    April 22, 2018 at 6:24 pm

    Great article. Often I’ll setup up log-shipping even if it’s not a true DR box because then I get “automatic” testing of my log-backups for free.

    Mind if I add a few of these to my SQL Saturday talk on Backups? Especially the CHECKSUM one?

    • Angela Tidwell
      Angela Tidwell says:
      May 2, 2018 at 4:29 pm

      Thank you so much for your feed back! I would be honored if you use my material!

  2. Akalu Heyi
    Akalu Heyi says:
    May 16, 2021 at 10:32 pm

    Awesome! pretty simple way of articulating…

  3. Jeff Moden
    Jeff Moden says:
    August 6, 2022 at 6:15 pm

    Thanks for the article. I appreciate anyone that steps up to the plate to share their knowledge with others.

    The code you posted that looks like this…
    _________________________________________

    Restore Database TestDB;
    From Disk=’G:DBABackupsTestDBFull_MMDDYYYY.bak’
    With VerifyOnly;
    _________________________________________

    …appears to have two issues…

    1. Stray semi-colon in the first line.
    2. Once 1. is fixed and running the code, it produces the following error:
    _________________________________________

    Msg 155, Level 15, State 1, Line 14
    ‘VerifyOnly’ is not a recognized RESTORE option.
    _________________________________________

    The correct format for using the the VerifyOnly test is as follows:

    RESTORE VERIFYONLY
    FROM DISK=’G:\insertfullpathhere\DBABackupsTestDBFull_MMDDYYYY.bak’
    ;

  4. Jeff Moden
    Jeff Moden says:
    August 6, 2022 at 6:16 pm

    Sorry… the forum wrapped the disk path. It needs to be on a single line.

Trackbacks & Pingbacks

  1. Does Your Database Have any Integrity? - SQL Server Consulting says:
    August 6, 2018 at 2:37 am

    […] discussed in an earlier blog, Validating SQL Server Backups, your data validation needs to take place BEFORE the backups are taken.  A best practice is to run […]

  2. SQL Server Recovery Models - SQL Server Consulting says:
    May 9, 2018 at 5:00 pm

    […] Please come back next time when we will explore ways to validate those backups. […]

Comments are closed.

Join Our Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,21,false,1,First Name,21,false,1,Last Name,2
Search Search

Blog Categories

  • $150 Challenge
  • About ProcureSQL
  • Advice
  • Analytics
  • Announcements
  • Artificial Intelligence
  • Auditing
  • Awards
  • Azure Data Factory
  • C-Level
  • Cloud
  • Community
  • Conferences
  • Data Architecture
  • Data Engineering
  • Data Integration
  • Data Intergration
  • Data Strategy
  • Data Visualization
  • Data Warehousing
  • Database Administration
  • DBA 101
  • Design
  • Disaster Recovery or High Availability
  • Education
  • Fabric Dev Ops
  • Fabric Lakehouse
  • Fabric Lakehouses
  • Fabric Mirroring
  • Fabric Notebooks
  • Features
  • General
  • Health Checks
  • Lab
  • Microsoft Fabric
  • Microsoft Fabric
  • Microsoft Technologies
  • Newsletter
  • Performance Tuning
  • Performance Tuning
  • Power BI
  • Power BI
  • ProcureSQL
  • Python
  • Reporting
  • Security
  • SQL Server
  • SQL Server
  • sql server 101
  • SQLServerPedia Syndication
  • syndication
  • The Blog
  • Uncategorized
  • Visual Studio Credit

Tags

#SQLFamily automatic tuning availability group azure backup Backups career Data Governance Data Loss Data Platform DBA Denver Differential Backup Disaster Recovery Fabric Fabric Architecture Full Backup High Availability Houston Marketing Database Administrator Microsoft Microsoft Fabric Microsoft SQL Server mirroring parameter sniffing PASS performance tuning Professional Development query store Recovery Recovery Model Restores Security SQL Saturday SQL Server SQL Server 2017 sql server 2019 SQL Server 2022 sql server 2025 SSMS System Databases Transaction Log Backup tsqltuesday Tuning Wait Stats

Archives

  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • November 2025
  • October 2025
  • September 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • February 2024
  • January 2024
  • November 2023
  • October 2023
  • March 2023
  • January 2023
  • May 2022
  • April 2022
  • November 2021
  • September 2020
  • August 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • July 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • December 2016
  • November 2016
  • October 2016
  • July 2016
© Copyright 2026 - ProcureSQL - 1464 East Whitestone Blvd., Suite 1902 Cedar Park, TX 78613, USA
  • Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Link to: Why We’re Organizing SQL Saturday in Wheeling, WV on April 28th Link to: Why We’re Organizing SQL Saturday in Wheeling, WV on April 28th Why We’re Organizing SQL Saturday in Wheeling, WV on April 28th Link to: The Importance of SQL Saturdays Link to: The Importance of SQL Saturdays Procure SQL - the importance of SQL SaturdayThe Importance of SQL Saturdays
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}