December 30, 2012 at 1:26 am
Hi,
I am facing an error while restoring adventure works database to my sql server 2008.
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
The media family on device 'D:\ssis_works\New folder\SQL2008.AdventureWorksLT2008_Only_Database\AdventureWorksLT2008_Data.mdf' 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=10.50.1617&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Plz help me to resolve this issue...
December 30, 2012 at 1:34 am
You are trying to restore the mdf file. You need to attach the file to your server such that it recreates the ldf file. Not sure how you do that as I haven't had to yet.
December 30, 2012 at 1:42 am
I have tried to with ldf file also. I got the same issue.
Below the steps i followed to restore the database from disc.
step 1 : Logging sql server
step 2: Right click on Database. restore database
step 3 : selected the .mdf file
step 4: click ok
after clicking the ok button i got the error msg.
December 30, 2012 at 1:43 am
sanandh87 (12/30/2012)
I have tried to with ldf file also. I got the same issue.Below the steps i followed to restore the database from disc.
step 1 : Logging sql server
step 2: Right click on Database. restore database
step 3 : selected the .mdf file
step 4: click ok
after clicking the ok button i got the error msg.
You do not restore the mdf file, you need to attach it. The mdf file is NOT a backup file.
December 30, 2012 at 1:46 am
Thanks for info. I tried what you instruct but i got an error.
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'ANANDH-HP'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617.0+((KJ_RTM_GDR).110422-1901+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Unable to open the physical file "D:\ssis_works\New folder\SQL2008.AdventureWorksLT2008_Only_Database\AdventureWorksLT2008_Data.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1617&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Plz help me on this...
December 30, 2012 at 1:53 am
Looks like a permissions issue on the mdf file.
December 30, 2012 at 1:55 am
Please help me to resolve this issue..
December 30, 2012 at 1:58 am
sanandh87 (12/30/2012)
Please help me to resolve this issue..
It is a permissions issue. You will need to check the permissions of the file on your system and resolve it such that SQL Server can access the file.
December 31, 2012 at 12:23 pm
Remember that D:\ is from the perspective of the server. If you have downloaded the AdventureWorks mdf file to your own D:\ drive and are trying to attach it to a shared instance that is not hosted on your local machine, i.e. that does not have access to the file using that same path to your local D:\ drive, then you can see problems like this too.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
January 3, 2013 at 2:57 am
Checkout these references would be help you:
http://msdn.microsoft.com/en-us/library/ms177429.aspx
http://www.howtogeek.com/50354/restoring-a-sql-database-backup-using-sql-server-management-studio/
If the above solution did not work try this free trial version of SQL Database recovery Software.
http://www.repairsqlserver.net
Thanks
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply