Checksum - Database Reference Guide - Foundation 23.1 - Foundation 23.1 - Ready - OnBase - external

Database Reference Guide

Platform
OnBase
Product
Database Reference Guide
Release
Foundation 23.1
License

Checksums are a feature provided by SQL Server to help detect possible page corruption at the I/O subsystem layer. Checksums are a form of page verification. When enabled, they cause SQL server to calculate a special value that is stored in the header of the page whenever it writes that page to disk. This value is then recalculated when SQL Server reads the page into memory again. The checksum is based off the physical values on the page. Therefore, SQL Server determining that the checksum does not match since the last time it calculated may mean an outside entity changed the page, hinting at possible I/O level corruption.

In addition to having this value checked upon reading the page into the memory buffer, SQL Server also offers validation when performing a backup with the Perform checksum before writing to media option. Setting this option for a backup allows the checksums for all pages containing a checksum to be validated as the backup is taken. SQL Server will throw errors and fail the backup job if it detects any incorrect checksums. When this option is enabled, the backup stream itself will also include a checksum, which can be utilized upon restore to further assist finding corruption early.

Tip:

Enable the backup option Perform checksum before writing to media.

To read more about backing up with the checksum option, please refer to Microsoft SQL Server Books Online.