?
Solved

Restore sql server express 2008 backup to sql server 2005 fails

Posted on 2011-03-09
6
Medium Priority
?
517 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 total points
ID: 35093203
You can follow instructions from this article:
http://www.devx.com/dbzone/Article/40531
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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…
Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 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