tags:

views:

953

answers:

5

I have taken backup of SQL Server 2008 DB on server, and download them to local environment.

I am trying to restore that database and it is keep on giving me following error.


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------ ADDITIONAL INFORMATION:

The media family on device 'C:\go4sharepoint_1384_8481.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476

I have tried to create a temp DB on server and tried to restore the same backup file and that works. I have also tried no. of times downloading file from server to local pc using different options on Filezila (Auto, Binary)

But its not working. After that I tried to execute following command on server.

BACKUP DATABASE go4sharepoint_1384_8481 
TO DISK=' C:\HostingSpaces\dbname_jun14_2010_new.bak' with FORMAT

And it is giving me following error.

Msg 3201, Level 16, State 1, Line 1 Cannot open backup device 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\ C:\HostingSpaces\dbname_jun14_2010_new.bak'. Operating system error 123(The filename, directory name, or volume label syntax is incorrect.). Msg 3013, Level 16, State 1, Line 1 BACKUP DATABASE is terminating abnormally.

After researching I found following 2 useful links 1) http://support.microsoft.com/kb/290787 2) http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/4d5836f6-be65-47a1-ad5d-c81caaf1044f

But still I can't able to restore Database correctly.

Any help would be much appreciated thanks.

A: 

My guess is that you are trying to restore in lower versions which wont work

Madhivanan
Nope I am using SQL Server 2008
Jordon
A: 

I think you have 2 separate problems, 1. with restoring and 2. with creating

For 1. you could try checking to see if the file was transferred properly (one easy way would be to check the md5 of the file on the server and again on the local environment to see if they match).

potatopeelings
+1  A: 
Cannot open backup device 'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Backup\ C:\HostingSpaces\dbname_jun14_2010_new.bak'

The error is quite self-explanatory. The file C:\program files\...\Backup \c:\Hosting...\ is incorrectly formatted. This is quite obvious if you inspect the file name. Perhaps ommit the extra space in your backup statement?

BACKUP DATABASE go4sharepoint_1384_8481 
TO DISK='C:\HostingSpaces\dbname_jun14_2010_new.bak' with FORMAT

Note there is no space between ' and C:

Remus Rusanu
A: 

I have found the answer.

You can check out this blog post, It had solved my problem.

http://dotnetguts.blogspot.com/2010/06/restore-failed-for-server-restore.html

Jordon
A: 

Had a similar issue copying databases between 2 SQL 2008 instances running on different servers - turned out to be related to hyberbac running on one server compressing the data and not running on the other server.

Either shutdown or startup hyberbac on both servers.

Thanks Mick

Mick Ando