Backup WITH CHECKSUM

I’m attending on the Quickstart’s SQL Server 2008 Microsoft Certified Master (MCM) Accelerated Exam Preparation Program and a question came up yesterday: Can we use the WITH CHECKSUM with transaction log backups? The answer is pretty simple: yes, we can.

Here is a sample script for evidence Smile

USE [master];
GO
BACKUP DATABASE [AdventureWorks2012] TO DISK='c:\DbBackups\AW2012\aw2012full.bak' WITH INIT, CHECKSUM;
GO
BACKUP LOG [AdventureWorks2012] TO DISK='c:\DbBackups\AW2012\aw2012tr.bak' WITH INIT, CHECKSUM;
GO
RESTORE HEADERONLY FROM DISK='c:\DbBackups\AW2012\aw2012full.bak';
--HasBackupChecksum column is 1, we have checksum :)
GO
RESTORE HEADERONLY FROM DISK='c:\DbBackups\AW2012\aw2012tr.bak';
--HasBackupChecksum column is 1, we have checksum for log backup as well:)
GO

Add comment