Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,

I have an SQL database backup of .MDF and .LDF files. While i tried to restore, it shows error like


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
The media family on device 'E:\ElectionDB\SAMPLE.mdf' is incorrectly formed. SQL Server cannot process this media family.
RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)



Actually i tried to restore from SQL2003 to SQL2005.
I use to restore as...

1.Create new database with some(SAMPLE) name.(I have an doubt here, whether i should have same database name)

2. While i tried to restore it by rightclick-->tasks-->restore-->database. It shows an error as i mentioned above.

3. Even i just copy and Paste those files(.MDF and .LDF) to Programfiles--->MSSQL-->DATA-->SAMPLE.MDF & SAMPLE.LDF.....but no luck

Please help me out....
Posted
Updated 5-Jul-11 3:01am
v2
Comments
Timberbird 5-Jul-11 10:14am    
First question - what is the version of SQL server your backup comes from? I mean - what is SQL2003? I ask because if you mean "Sql Server 2003", I've never heard of it - there are Sql Server 2000, 2005, 2008 and 2008 R2
J.Karthick 12-Aug-11 6:36am    
that was SQL 2000 not 2003

do the following steps,

1) create database !
2) restore it by rightclick-tasks-restore-database.but before that go to options and select the overwrite existing database chk box. It will work.
 
Share this answer
 
v2
Comments
J.Karthick 5-Jul-11 9:01am    
ya...ya....i gave it...but no luck...
Do you have any idea about that error...
siddhai12 5-Jul-11 9:02am    
will u pls attached that backup file ?
J.Karthick 5-Jul-11 9:41am    
backup here? What you gonna do?
Got solution,

I need to "RightClick Databases"-->"Attach.."-->"Add"

It just create an database and made records inside
Solves my problem....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900