Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Database restore issue
Database restore issue
Rate Topic
Display Mode
Topic Options
Author
Message
sanandh87
sanandh87
Posted Sunday, December 30, 2012 1:26 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24,
Visits: 51
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...
Post #1401232
Lynn Pettis
Lynn Pettis
Posted Sunday, December 30, 2012 1:33 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:33 PM
Points: 21,625,
Visits: 27,467
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.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1401233
sanandh87
sanandh87
Posted Sunday, December 30, 2012 1:42 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24,
Visits: 51
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.
Post #1401234
Lynn Pettis
Lynn Pettis
Posted Sunday, December 30, 2012 1:43 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:33 PM
Points: 21,625,
Visits: 27,467
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.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1401235
sanandh87
sanandh87
Posted Sunday, December 30, 2012 1:46 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24,
Visits: 51
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...
Post #1401236
Lynn Pettis
Lynn Pettis
Posted Sunday, December 30, 2012 1:53 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:33 PM
Points: 21,625,
Visits: 27,467
Looks like a permissions issue on the mdf file.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1401237
sanandh87
sanandh87
Posted Sunday, December 30, 2012 1:55 AM
Grasshopper
Group: General Forum Members
Last Login: Friday, March 15, 2013 1:01 AM
Points: 24,
Visits: 51
Please help me to resolve this issue..
Post #1401238
Lynn Pettis
Lynn Pettis
Posted Sunday, December 30, 2012 1:58 AM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 10:33 PM
Points: 21,625,
Visits: 27,467
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.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1401239
opc.three
opc.three
Posted Monday, December 31, 2012 12:23 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 6:57 PM
Points: 6,724,
Visits: 11,771
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
Believe you can and you're halfway there.
--Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler
--Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
--Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples.
--Giordy
Post #1401474
jonmichel72
jonmichel72
Posted Thursday, January 03, 2013 2:57 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, February 07, 2013 5:14 AM
Points: 4,
Visits: 2
Checkout these references would be help you:
http://msdn.microsoft.com/en-us/library/ms177429.aspx
http://www.techrepublic.com/blog/window-on-windows/how-do-i-restore-a-sql-server-database-to-a-new-server/454
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
Post #1402261
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.