Solved

Restore sql server express 2008 backup to sql server 2005 fails

Posted on 2011-03-09
6
504 Views
Last Modified: 2012-05-11
Hi,

I have a local installation of sql server express 2008. On the production machine it's a sql server 2005 installed. I have for long times just created a local database for development and then backed it up and restored it on the production server and everything has worked fine.

Now I have a new development machine and when I now try to do the same I get this error.
"The media family on device 'c\...' is incorrectly formed. SQL Server cannot process this media family."

I then tried to import and export the database and data and that went ok, but when I do so the foreign and primary keys are lost and it's a big database so that would take a long time to go through.

I then tried to first create scripts for the database tables and run them to get the right schema for all tables. Then I imported, but then I got an error that some tables have foreign keys and then you cannot import to these tables.

Does someone have a solution to this dilemma I would be very grateful.

Peter
0
Comment
Question by:peternordberg
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35092755
a backup created in MS  SQL 2008 cannnot be restore in MS SQL 2005
0
 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35092763
0
 
LVL 14

Expert Comment

by:Daniel_PL
ID: 35092805
You can try to first generate script for create database in SSMS.
Next you can generate scripts for objects in that database right click on your db, pick tasks, pick generate scripts... Choose your database, on next screen please turn to true all objects you want to script, e.g.:
script triggers, indexes, primary keys, foreign keys, check constrainsts etc. etc.
You can use wizard to copy data between databases.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 9

Expert Comment

by:mayank_joshi
ID: 35092896
If restoring to earlier version of SQL Server problem is not there
then you can try taking the backup once again to a new media set:-

BACKUP DATABASE [DBName] TO  DISK = 'E:\DBName.bak' WITH FORMAT, INIT,  MEDIANAME = 'NewMediaSetName',  NAME = 'DBName-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

Open in new window


0
 

Author Comment

by:peternordberg
ID: 35093026
Hi and thanks for your answers,

I've tried both your solutions without success. Daniel, I get this error when trying your approach:
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '100'.
Msg 911, Level 16, State 1, Line 3
Could not locate entry in sysdatabases for database 'MirakelOrg'. No entry found with that name. Make sure that the name is entered correctly.
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'MirakelOrg', or the database does not exist.
Msg 5069, Level 16, State 1, Line 1

mayank_joshi:
I get the same error on restoring the database when I try the aprocha you gave me.

Thnaks for help!

Peter

0
 
LVL 14

Accepted Solution

by:
Daniel_PL earned 500 total points
ID: 35093203
You can follow instructions from this article:
http://www.devx.com/dbzone/Article/40531
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with stripping out character in SQL LEFT/RIGHT/REPLACE 2 40
select over clause 1 40
Urgent help needed! Unable to to paste in query designer 29 37
Sql query 107 27
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now