Why This Error Happens
Error 3211 in SQL Server 2025 is generated during BACKUP or RESTORE operations and represents the progress-reporting message “%d percent processed.” When this message stalls or repeats at the same percentage without advancing, it typically indicates that the Virtual Device Interface (VDI) used by the backup process has lost communication with the SQL Server service, often due to disk I/O bottlenecks, antivirus software locking the backup file mid-write, or insufficient permissions on the target backup directory. In some cases, this also surfaces when the underlying storage volume (especially ReFS volumes on Windows Server 2025) throttles write operations, causing the backup thread to appear hung.
Step-by-Step Resolution Guide
Step 1: Verify Backup Target Permissions and Path
- Confirm the SQL Server service account (e.g.,
NT Service\MSSQLSERVERor a custom domain account) has Modify and Write permissions on the backup destination folder. - Check the path in
sys.dm_exec_requestsor SSMS Activity Monitor to confirm the exact UNC or local path being used. - If using a network share, validate connectivity with
Test-NetConnection -ComputerName <ServerName> -Port 445from PowerShell.
Step 2: Exclude SQL Server Processes from Antivirus Scanning
- Open Windows Security (or your third-party AV console) and add exclusions for:
C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\sqlservr.exeandsqlagent.exeprocess exclusions.- Restart the SQL Server service after applying exclusions:
net stop MSSQLSERVER && net start MSSQLSERVER
Step 3: Check Disk I/O and Storage Health
- Run
Perfmonand monitor the Avg. Disk sec/Write counter on the backup volume; values above 20ms indicate I/O contention. - If using ReFS on Windows Server 2025, validate volume health with:
Repair-Volume -DriveLetter D -Scan
- Consider moving backups to a dedicated, non-OS volume if contention is confirmed.
Step 4: Increase Backup Buffer and Timeout Settings
- Adjust the
BUFFERCOUNTandMAXTRANSFERSIZEparameters in your backup command to reduce I/O stalls:
BACKUP DATABASE [YourDB]
TO DISK = 'D:\Backups\YourDB.bak'
WITH BUFFERCOUNT = 50, MAXTRANSFERSIZE = 4194304;
- This reduces the frequency of disk flushes, allowing the percent-processed counter to advance smoothly.
Step 5: Review SQL Server Error Log for Underlying I/O Errors
- Open
ERRORLOGvia SSMS (Management > SQL Server Logs) and search for any 823/824 I/O error messages occurring alongside 3211. - Resolve any flagged corruption using
DBCC CHECKDBbefore retrying the backup/restore.
Alternative or Verification Steps
- Run the backup again and monitor
sys.dm_exec_requests(percent_completecolumn) to confirm steady progression instead of stalling at a fixed value. - If the issue persists, use
sqlcmdwith the-bflag to capture verbose output and isolate whether the stall is network, disk, or SQL Engine related.