Restore Database From SQL Server 2008 to SQL Server 2005, Part 1: Introduction
MS SQL Server, Windows August 11th, 2009Problem
When you restore or attach a database which is created from SQL Server 2008 to SQL Server 2005 or SQL Server 2000, you will see some error messages as the examples below.
Backup and Restore
You have backup a database from SQL Server 2008. If you try to restore the backup database file to SQL Server 2005, you will receive the error message:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Additional information:
-> The media family on device ‘the backup file‘ is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

Detach and Attach
You have detach a database from SQL Server 2008. If you try to attach the detached database file to SQL Server 2005, you will receive the error message:
Attach database failed for Server ‘SQL Server name’. (Microsoft.SqlServer.Smo)
Additional information:
-> An exception occurred while executing a Transact-SQL statement batch. (Microsoft.SqlServer.ConnectionInfo)
–> The database ‘database name’ cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported.
Could not open new database ‘database name’. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 948)

Solution
These problems occur because a backup or detach database file is not backward compatible. You cannot restore or attach a database which is created from a higher version of SQL Server to a lower version of SQL Server.
But there are some alternatives which can help you to restore a database to a lower version of SQL Server. I divide into separate parts.
- Part 2: Generate SQL Server Scripts Wizard. The solution creates a SQL Server script file using a wizard. Then, you simply execute the script file on SQL Server 2005 or SQL Server 2000. So you will get everything as same as the source database on the destination. But there are some disadvantages:
- If the source database contains lots of data, you will have a large script file.
- The generated file is a plain text. Anyone who has access to the file can read it. So you should delete the script file after the restoration.
- Part 3: Import and Export Wizard. This solution exports data to the targeted SQL Server using a wizard. It is more secure and effective than the first solution. But you can only export tables and views only.
Related post
- Restore Database From SQL Server 2008 to SQL Server 2005, Part 2: Generate SQL Server Scripts Wizard Generate SQL Server Scripts Wizard On Part 1: Introduction, I mentioned about error messages when you try to restore a...
- Restore Database From SQL Server 2008 to SQL Server 2005, Part 3: Export Data Wizard Export Data Wizard On Part 1: Introduction, I mentioned about error messages when you try to restore a database from...
- How to backup and restore database on Microsoft SQL Server 2005 Introduction This post will give you a brief introduction of SQL Server backup. As we know, SQL Server backup software...
Related posts:




May 1st, 2010 at 3:57 am
I had the same issue, and exporting from the source development server running SQLServer 200) to the target production server running 2005 worked fine. Thanks for your post!
December 3rd, 2010 at 9:56 pm
i really was impressed in the detail for the total related query language ,thanks.
May 1st, 2011 at 12:01 am
HI…
I am having sql server 2008 db file…and I am having sql server 2005 . I am unable to attach the file .Plz let me know the procedure and if any body can help by Converting the script file plz mail me at fairprince4u@yahoo.com ..
Its very urgent to me…
December 29th, 2011 at 10:10 pm
This link has more details on this error:
http://sqlserverlearner.com/2011/the-media-family-on-device-is-incorrectly-formed-sql-server-cannot-process-this-media-family-error-3241