Troubleshooting Guide: SQL Server Error 3215 with Mirrored Backup Sets
Why This Error Happens
Error 3215 occurs when the WITH FORMAT option is used to create a new mirrored backup set, but one or more of the backup devices specified cannot be properly formatted or initialized due to a mismatch in device count, inaccessible media, or conflicting prior backup header information. This typically happens when the number of MIRROR TO clauses does not match the required mirror configuration, or when a target backup file/device is locked, write-protected, or residing on a path with insufficient permissions. In Windows Server 2025 / Windows 11 environments, this is frequently compounded by stricter NTFS permission inheritance and SMB share authentication changes introduced in newer OS builds.
Step-by-Step Resolution Guide
Step 1: Verify Mirror Device Syntax and Count
- Confirm that every
MIRROR TO DISKclause has a matching number of files/devices as the primaryTO DISKclause. - Example correct syntax:
BACKUP DATABASE [YourDB]
TO DISK = 'E:\Backups\Primary1.bak'
MIRROR TO DISK = 'F:\Backups\Mirror1.bak'
WITH FORMAT, INIT;
- Ensure each mirror set has an equal number of backup devices (1-to-1 mapping is mandatory for mirrored sets).
Step 2: Check File System and Share Permissions
- Verify the SQL Server service account has Modify and Write NTFS permissions on all target folders (both primary and mirror paths).
- On Windows Server 2025, open
File Explorer > Properties > Securityon the backup folder and confirm the SQL Server service account (e.g.,NT Service\MSSQLSERVER) is listed. - If using a network share, validate SMB signing/encryption settings via:
Get-SmbServerConfiguration | Select EncryptData, RequireSecuritySignature
- Grant explicit permissions using PowerShell if missing:
icacls "F:\Backups" /grant "NT SERVICE\MSSQLSERVER:(OI)(CI)F"
Step 3: Clear Device Conflicts and Pre-existing Headers
- Delete or rename any pre-existing
.bakfiles at the target mirror path that may have corrupted or mismatched media headers. - Run
DBCC CHECKDBonly after backups succeed—do not attempt to reuse a corrupted mirrored media set. - Re-run the backup command with
WITH FORMAT, SKIP, INITto force a fresh media set:
BACKUP DATABASE [YourDB]
TO DISK = 'E:\Backups\Primary1.bak'
MIRROR TO DISK = 'F:\Backups\Mirror1.bak'
WITH FORMAT, SKIP, INIT, STATS = 10;
Step 4: Restart SQL Server Service and Validate Disk Health
- Restart the SQL Server (MSSQLSERVER) service via
services.mscor PowerShell:
Restart-Service -Name MSSQLSERVER -Force
- Run
chkdsk F: /fon the mirror target volume to rule out underlying disk corruption, especially if using Storage Spaces Direct on Windows Server 2025.
Alternative or Verification Steps
- After re-running the backup, check
sys.backup_devicesand the SQL Server Error Log for confirmation that both primary and mirror sets were created without warnings. - If the error persists, bypass mirroring temporarily by backing up to a single device (
TO DISKonly) to isolate whether the issue is specific to the mirror path or a broader backup configuration problem.