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

Troubleshooting Guide: SQL Server Error 3133 — Media Family Sequence Mismatch

Why This Error Happens

Error 3133 occurs when SQL Server reads a backup device and finds that the media family sequence number on the volume does not match what the restore or backup operation expects. This typically happens when backup files spanning multiple volumes (multi-file or striped backups) are restored out of order, a file in the media set is missing, or the backup set has been corrupted due to improper file handling, truncation, or disk/storage failure. It can also occur if a backup was manually copied or renamed in a way that disrupts the original media family sequencing.

Step-by-Step Resolution Guide

Step 1: Verify the Backup File Set and Sequence Order

  • Confirm you have all files belonging to the same backup media set (e.g., .bak, .trn, or striped files like backup1.dat, backup2.dat).
  • Check the original backup command or job history to determine the correct sequence order of media families.
  • Run the following to inspect header details:
RESTORE HEADERONLY FROM DISK = 'C:\Backups\backup1.bak'
  • Verify the FamilySequenceNumber and MediaFamilyCount columns match across all files.

Step 2: Reconstruct the Correct RESTORE Statement

  • If the backup spans multiple files, ensure all files are listed in the correct order within a single RESTORE DATABASE statement.
  • Example syntax for a striped backup set:
RESTORE DATABASE [YourDB]
FROM DISK = 'C:\Backups\backup1.bak',
     DISK = 'C:\Backups\backup2.bak',
     DISK = 'C:\Backups\backup3.bak'
WITH RECOVERY;
  • Do not mix files from different backup sets or sessions, as this triggers sequence mismatches.

Step 3: Check for File Corruption or Truncation

  • Validate backup integrity using:
RESTORE VERIFYONLY FROM DISK = 'C:\Backups\backup1.bak'
  • If verification fails, check the source storage (SAN, NAS, or local disk) for I/O errors in Windows Event Viewer under Windows Logs > System.
  • Re-copy the backup files from the original source location, ensuring no network interruption or antivirus software locked/altered the files during transfer.

Step 4: Rebuild the Backup Set if Files Are Missing

  • If one or more media family files are missing or unrecoverable, the backup set cannot be restored as a whole.
  • Check C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Backup\ (adjust instance path) for any remaining media family files.
  • If no complete set exists, revert to the last known good full backup and subsequent transaction log backups taken as a complete, uninterrupted set.

Alternative or Verification Steps

  • After a successful restore, run DBCC CHECKDB against the restored database to confirm consistency and rule out underlying corruption.
  • If Error 3133 persists despite having all files, test restoring on a different SQL Server 2025 instance or Windows Server 2025 host to rule out local storage/driver issues affecting backup device reads.