I have a SQL Server 2012 database with filestream enabled. However, when I backup it and try to restore it on another SQL Server 2012 instance (on another machine), I simply
Another potential reason for this glitch appears to be Google Drive. Google Drive is compressing bak files or something, so if you want to transfer a database backup via Google Drive, it appears you must zip it first.
FYI: I found that when restoring, I needed to use the same (SQL User) credentials to login to SSMS. I had first tried the restore using a Windows Authentication account.
When running:
RESTORE DATABASE <YourDatabase>
FROM DISK='<the path to your backup file>\<YourDatabase>.bak'
It gave me the following error:
The media family on device 'C:\NorthwindDB.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241) Blockquote
Turns out You cannot take a DB from a Higher SQL version to a lower one, even if the compatibility level is the same on both source and destination DB. To check the SQL version run:
Select @@Version
To see the difference, just create a DB on your source SQL server and try to do a restore from your backup file, when you do this whit SSMS, once you pick the backup file it will show some info about it as opossed to when you open it from a lower version server that will just say "no backupset selected to be restored"
So if You still need to move your data to a lower version SQL then check This.
In my case, it was a permissions issue.
For the Windows user, I was using did not have dbcreator
role.
So I followed the below steps
sa
to the SQL serverSecurity
in Object ExplorerLogins
Server Roles
from Select a page
optionsdbcreator
role for the user I think I get the award for the most bone headed reason to get this error. In the Restore Database dialog, the database dropdown under Source is gray and I thought it was disabled. I skipped down to the database dropdown under Destination thinking it was the source and made a selection. Doing this will cause this error message to be displayed.
I had this problem and it turned out I was trying to restore to the wrong version of SQL. If you want more information on what's going on, try restoring the database using the following SQL:
RESTORE DATABASE <YourDatabase>
FROM DISK='<the path to your backup file>\<YourDatabase>.bak'
That should give you the error message that you need to debug this.