-
-
Notifications
You must be signed in to change notification settings - Fork 837
Description
Summarize Functionality
Add a -Checksum
parameter to Test-DbaLastBackup which controls whether to include WITH CHECKSUM
to the issued RESTORE VERIFYONLY
command.
Is there a command that is similiar or close to what you are looking for?
No
Technical Details
Currently Test-DbaLastBackup does not offer any option to control whether the RESTORE VERIFYONLY
command uses WITH CHECKSUM
or NO_CHECKSUM
.
As this parameter is omitted for the RESTORE VERIFYONLY
command the default is applied, which means that backup checksums will be validated if they exist:
The default behavior is to verify checksums if they are present and proceed without verification if they are not present.
Following best practices backups should always contain checksums, and therefore having the option to be alerted in case no checksum is present would be a nice.
That would be done by using RESTORE VERIFYONLY ... WITH CHECKSUM
and result in this behavior:
Specifies that backup checksums must be verified and, if the backup lacks backup checksums, causes the restore operation to fail with a message indicating that checksums are not present.
Further information regarding the backup checksum mechanisms in SQL server: https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/possible-media-errors-during-backup-and-restore-sql-server?view=sql-server-ver16