Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have a .bak file created by some other user in (I think) SQL Server 2008 R2 (10.50) and I need to restore it in SQL Server R2 SP2 (10.52). I used a hex viewer to look into the .bak file and found out a string containing something like "MSSQL10_50.SQL...", so that's how I guessed it was created in R2.

I get errors when trying to restore it from Management Studio interface, and also when I try to only verify the .bak file using T-SQL:

RESTORE VERIFYONLY FROM DISK = N'D:\aep_p.bak'
GO

I get:

Msg 3241, Level 16, State 13, Line 1
The media family on device 'D:\aep_p.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.

My questions are:

  1. Is it possible to restore a .bak from R2 to R2 SP2?
  2. If yes, then why do I get that error?

EDIT Thank you all for your suggestions. The guys from the MSDN forums found a solution to my problem. It seemed that was my fault, because I was trying to open a .bak file created in SQL Server Express 2012 in SQL Server Express R2 SP2 :)

http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/14b55c7a-809f-4700-a649-de1370531ec8/

share

migration rejected from stackoverflow.com Jul 30 at 17:37

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Paul White, Mark Storey-Smith, Max Vernon, ypercube, RLF Jul 30 at 17:37

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Paul White, Mark Storey-Smith, Max Vernon, ypercube, RLF
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
What happens if you do a RESTORE HEADERONLY FROM DISK=<backup file location>? –  Mike Fal May 21 '13 at 20:18
    
Actually, SQL Server 2008 R2 SP2 is 10.50.4000 source. What @MikeFal suggested will give you the version number of the source server. –  swasheck May 22 '13 at 3:35
1  
RESTORE HEADERONLY FROM DISK = N'D:\aep_p.bak'; Look at the SoftwareVersionMajor, SoftwareVersionMinor and SoftwareVersionBuild columns - they will give you the version of the server that created the backup. –  Greenstone Walker May 22 '13 at 4:58
1  
RESTORE LABELONLY FROM DISK = N'D:\aep_p.bak'; Look at the FamilySequenceNumber and MediaSequenceNumber columns. Perhaps this bak file is one of a set - you can't restore unless you have all members of the set. –  Greenstone Walker May 22 '13 at 5:01

2 Answers 2

up vote 1 down vote accepted

In theory, yes this is possible.

The error you are getting, though, could be down to:

  • the backup file being corrupt - can the backup be successfully restored on another server?
  • the backup file being created with something other than SQL Server backup
  • your SQL Server service hasn't got the right permissions to read the backup file
share

The service pack should not be the problem. All information I have found points to a problem with the actual .bak file itself. There was an interesting piece on SQLCoffee about transfer protocol corrupting a .bak file. Basic premise was the FTP mode was text instead of binary. How was the .bak transferred and can you have another copy ported over?

Wrong FTP mode

share
    
I'm wondering if you think that the FTP problem could be avoided by putting your .bak file into a RAR or .zip file. –  teknohed Jul 29 at 18:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.