So, you probably tried to restore your backup and during this process you got a strange error saying that the media family on device is incorrectly formed. We have searched the web and tried to find what are the situations in which people have encountered this error and tried to make a list of the most common cases.
Most common causes for this error
- The backup that was created is corrupt. A good way to avoid this happening is to use consistency verification options when creating the backup, see link. In order to determine if the backup file is corrupt or not we have a few options.
- In case the version of SQL Server that you are trying to restore the backup on is newer than the version from which you made the backup, then you should try to restore the backup on the same server it was created on, and if the restore process fails there too, then the backup file was corrupted.
- Now, in order to determine why the backup was created corrupted, you have to answer a simple question: Was your backup transfered to its current location via FTP?
- If the answer is YES, then check that the transfer mode for the file was done in BINARY mode and not in TEXT mode or otherwise. If it was anything but binary, do the transfer again with BINARY mode and try do restore the backup.
- In case restoring the backup on the original server works without a problem, then it is possible if you are trying to restore the backup on a newer version, but the new version is an Express edition, then if the backup is too large you might get this error.
- The backup might still be pointing to the old instance where it was made from.
- An Instance of SQL Server is just a name for the installation of SQL Server. Usually the first installation on a machine is the default instance, which has no specific name and you just connect to it as (local) or the name of the server machine.
- You can validate that the instance the backup is pointing at by running a simple query:
- This query will return the version of SQL Server the backup is pointing at.
- If you have SQL Express version installed, its instance name will typically be SQLExpress and you can connect to it using one of the three options:
- SQL Server instances are completely independent from each other and you have the freedom to install as many as you like, just be sure each installation has a unique instance name.
- The solution for this is to change the name of the instance you are trying to do the restore onto. If its a fresh installation, just reinstall and during the Instance configuration specify a different, unique name.