How to fix Error 3256 on Windows Server 2025 / Windows 11

Troubleshooting Guide: Error 3256 — Backup Set Terminated and Incomplete

Why This Error Happens

This error occurs when SQL Server 2025 detects that the backup file (.bak) on the specified device is truncated, corrupted, or was not fully written to disk, often because the backup operation was interrupted mid-process by a network drop, disk I/O failure, or manual cancellation. It can also occur if antivirus software or a backup agent locks or modifies the file while SQL Server is still writing to it. Additionally, insufficient disk space on the target volume during the backup operation can cause the write to fail silently, leaving an incomplete backup set that later fails validation during a RESTORE sequence.

Step-by-Step Resolution Guide

Step 1: Verify the Integrity of the Backup File

  • Check the file size of the .bak file on disk and compare it against the expected size from the original backup job history (visible in msdb.dbo.backupset).
  • Run RESTORE VERIFYONLY FROM DISK = 'C:\Backups\YourFile.bak' in SQL Server Management Studio (SSMS) to confirm whether the file is readable.
  • If the command returns Error 3256 or 3241, the file is confirmed incomplete and cannot be used for restoration.

Step 2: Rule Out Storage and Network Interruptions

  • Check the Windows Server 2025 Event Viewer under Windows Logs > System for disk-related warnings (Event ID 153 or 157) around the timestamp of the backup job.
  • If backing up to a network share (UNC path), confirm the SQL Server service account has stable, uninterrupted connectivity — test with Test-NetConnection -ComputerName <ServerName> -Port 445 in PowerShell.
  • Ensure the destination drive had sufficient free space at the time of backup; check via Get-PSDrive or File Explorer properties.

Step 3: Exclude Antivirus and Backup Agent Interference

  • Open Windows Security (or your third-party antivirus console) and add an exclusion for the SQL Server data and backup directories, typically located at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\.
  • Disable any third-party backup agents (e.g., Veeam, Commvault) that may be running concurrent I/O operations on the same .bak file.
  • Restart the SQL Server service via services.msc or Restart-Service MSSQLSERVER after applying exclusions.

Step 4: Re-run the Backup Using WITH CHECKSUM

  • Execute a fresh, full backup using the WITH CHECKSUM option to enable page-level validation during the write process:
  • BACKUP DATABASE [YourDB] TO DISK = 'C:\Backups\YourFile_New.bak' WITH CHECKSUM, INIT;
  • This ensures any future corruption is caught immediately at backup time rather than during a later restore attempt.

Step 5: Restore From a Known-Good Backup Set

  • If the corrupted file cannot be salvaged, locate the most recent valid full backup and subsequent transaction log backups from your backup history table (msdb.dbo.backupset).
  • Run the RESTORE sequence again starting from the last verified good full backup: RESTORE DATABASE [YourDB] FROM DISK = 'C:\Backups\LastGood.bak' WITH NORECOVERY;
  • Apply any subsequent log backups in order, finishing with WITH RECOVERY on the final file.

Alternative or Verification Steps

  • To verify the fix, run RESTORE VERIFYONLY FROM DISK = 'C:\Backups\YourFile_New.bak' — a successful message with no errors confirms the backup set is now valid and complete.
  • If the issue persists across multiple backup attempts, run CHECKDB (DBCC CHECKDB('YourDB') WITH NO_INFOMSGS) on the source database to rule out underlying data corruption as the root cause, and consider moving the backup destination to a different physical disk or storage array.