Solved

RESTORE Error:  The media family on device 'd:\somepath\backupfileName is incorrectly formed

Posted on 2007-11-13
4
9,500 Views
Last Modified: 2008-02-01
HI,

I am getting this error when trying to restore and not sure why:

---------------------------
Microsoft SQL-DMO (ODBC SQLState: 42000)
---------------------------
The media family on device 'D:\Backups\DB_11_13_2007' is incorrectly formed. SQL Server cannot process this media family.
RESTORE DATABASE is terminating abnormally.
---------------------------
OK  
---------------------------

After this error, it then puts my database in this "loading" state in Enterprise Manager.  It acts if the DB is caught in the middle of restore or something.  Any help highly appreciated...

Any thoughts?

-ws
0
Comment
Question by:Westside2004
  • 2
4 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 20276491
Hi,

What is the SQL that you are trying to use, the code that gives this error?

Cheers
  David
0
 
LVL 6

Accepted Solution

by:
Spot_The_Cat earned 400 total points
ID: 20276561
Hi,

How are you trying to RESTORE the database and what's supposed to be in that backup file?

Also have you tried using
RESTORE HEADERONLY
RESTORE FILELISTONLY
RESTORE LABELONLY
and
RESTORE VERIFYONLY?

Finally - before you tried to perform the restore did you/could you back up the transaction log?

Spot
0
 
LVL 1

Author Comment

by:Westside2004
ID: 20277266
Hi,

@dtodd -  I am using SQL Server Enterprise Manager's GUI to do the restore, its basically wizard driven.

@Spot_The_Cat - The database says (restoring) next to it.   If I run the following code:

use "dbname"

I get this error:

Database 'dbname' cannot be opened. It is in the middle of a restore.

I have two harddrives on that machine, does it matter if the backup file is currently on the "D" drive as opposed to the "C" drive where sql server is actually installed?  I took a backup essentially of a database on a completely diff server, and I am trying to restore it here on this other machine.

-ws
0
 
LVL 35

Assisted Solution

by:David Todd
David Todd earned 100 total points
ID: 20277320
Hi,

Strongly suggest that you use the query editor and write it yourself, and use some of the info that Spot has given you, ie
RESTORE HEADERONLY
RESTORE FILELISTONLY

to show what is in the backup and where it came from and all that.

Regards
  David
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

707 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

11 Experts available now in Live!

Get 1:1 Help Now