Solved

Restore sql server express 2008 backup to sql server 2005 fails

Posted on 2011-03-09
6
505 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
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.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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