Troubleshooting Guide: SQL Server Error 3189 – Backup Set Damage Detected
Why This Error Happens
Error 3189 occurs when SQL Server’s backup verification process detects that the checksum values stored within the backup set do not match the actual data, indicating corruption. This typically results from disk I/O errors, network interruptions during the backup write operation, antivirus software locking or modifying the backup file mid-write, or physical storage media failure. In some cases, the backup file may have been truncated or altered after creation, causing the internal consistency checks to fail during a RESTORE VERIFYONLY or actual restore operation.
Step-by-Step Resolution Guide
Step 1: Verify the Integrity of the Source Backup File
- Run
RESTORE VERIFYONLY FROM DISK = 'D:\Backups\YourDatabase.bak'in SQL Server Management Studio (SSMS) to confirm whether the file is truly corrupted. - Check the file size on disk versus the expected size reported in SQL Server logs; a mismatch suggests a truncated transfer or incomplete write.
- Review the SQL Server Error Log (
Management > SQL Server Logsin SSMS) for I/O-related warnings around the time the backup was created.
Step 2: Rule Out Storage and Network-Level Corruption
- Check the Windows Event Viewer (
Windows Logs > System) for Disk or NTFS warnings (Event ID 7 or 51) on the backup destination drive. - If the backup resides on a network share, re-copy the file using
robocopy D:\Backups\ \\NetworkShare\Backups\ /Z /Vto ensure byte-level integrity during transfer. - Run
chkdsk D: /f /ron the backup destination volume to repair underlying file system corruption on Windows Server 2025.
Step 3: Exclude Antivirus and Backup Agent Interference
- Add an exclusion rule in Windows Defender (or third-party AV) for the backup directory (e.g.,
D:\Backups\*.bak) and thesqlservr.exeprocess. - Navigate to
Windows Security > Virus & threat protection > Manage settings > Exclusionsand add the folder path. - Re-run the backup job after excluding the directory to confirm antivirus wasn’t locking the file mid-write.
Step 4: Re-generate the Backup with Checksum Validation Enabled
- Execute a fresh backup using the
WITH CHECKSUMoption to catch corruption immediately at creation time: BACKUP DATABASE YourDatabase TO DISK = 'D:\Backups\YourDatabase_New.bak' WITH CHECKSUM, STATS = 10;- If the command fails with a page checksum error, run
DBCC CHECKDB('YourDatabase') WITH NO_INFOMSGS, ALL_ERRORMSGSto identify and repair corrupted pages in the source database itself.
Step 5: Restore from an Alternate Backup Source
- If the current backup set cannot be repaired, locate the most recent valid full backup and subsequent differential/log backups from a secondary storage location (e.g., offsite replica or cloud archive).
- Use
RESTORE DATABASE YourDatabase FROM DISK = 'E:\AlternateBackups\YourDatabase_Valid.bak' WITH REPLACE, RECOVERY;to restore from the verified clean copy.
Alternative or Verification Steps
- After applying fixes, run
RESTORE VERIFYONLY FROM DISK = 'D:\Backups\YourDatabase_New.bak'and confirm it returns “The backup set on file 1 is valid” with no errors. - If corruption persists across multiple backup attempts, treat it as a hardware-level issue — run
Get-PhysicalDisk | Get-StorageReliabilityCounterin PowerShell to check for predictive drive failure on the storage subsystem.