Troubleshooting Guide: SQL Server Error 3132 – “The Media Set Has %d Media Families But Only %d Are Provided”
Why This Error Happens
This error occurs when a SQL Server backup was created as a striped backup set, meaning it spans multiple physical files or media families (e.g., .bak1, .bak2, .bak3), but the RESTORE command only references a subset of those files. SQL Server requires all media family members to be present in the RESTORE DATABASE ... FROM DISK = statement simultaneously because the backup data is interleaved across all files, not sequential. This typically happens due to a missing/misplaced backup file, an incomplete file copy/transfer, or a manually typed restore script that omits a file from the original backup job.
Step-by-Step Resolution Guide
Step 1: Identify All Required Media Family Members
- Locate the original backup job history to determine how many files were used in the striped set.
- Run the following query against the
msdbdatabase to check the backup history:
SELECT physical_device_name
FROM msdb.dbo.backupmediafamily bmf
JOIN msdb.dbo.backupset bs ON bmf.media_set_id = bs.media_set_id
WHERE bs.name = 'YourBackupSetName';
- Confirm the total count of files matches the number referenced in the error (e.g., “media set has 4 media families”).
Step 2: Verify File Location and Integrity
- Check the backup source folder (e.g.,
D:\SQLBackups\or a network share) for all expected files. - Ensure no files were skipped during a copy operation between servers (a common issue when migrating backups to Windows Server 2025 via Storage Migration Service or
robocopy). - Confirm file permissions allow the SQL Server service account read access to every file in the set, not just the first one.
Step 3: Reconstruct the Full RESTORE Command
- Rewrite the T-SQL
RESTOREstatement to explicitly list every media family file using multipleDISK =clauses. - Example syntax for a 3-file striped set:
RESTORE DATABASE [YourDB]
FROM DISK = 'D:\SQLBackups\Backup_1.bak',
DISK = 'D:\SQLBackups\Backup_2.bak',
DISK = 'D:\SQLBackups\Backup_3.bak'
WITH RECOVERY;
- Do not attempt to restore using only one file path if the backup was originally striped—SQL Server will reject it.
Step 4: Re-run the Backup Job (If Files Are Permanently Lost)
- If one or more media family files are corrupted or missing beyond recovery, the entire striped backup set is unusable.
- Schedule a new full backup immediately to avoid relying on an incomplete set, using SQL Server Management Studio (SSMS) or
sqlcmdon Windows Server 2025. - Consider switching to a single-file backup strategy going forward to avoid future media family mismatches.
Alternative or Verification Steps
- To verify the fix, run
RESTORE VERIFYONLY FROM DISK = '...'(listing all files) before attempting a full restore—this confirms SQL Server can read the entire media set without errors. - If files cannot be located, check Windows Server 2025 Volume Shadow Copy Service (VSS) snapshots or backup software logs (e.g., Veeam, Windows Server Backup) for an alternate copy of the complete striped set.