Answers
![theDude](https://data3.answerbase.com/answerbase/1720/UserFiles/User27912/profileImage27912.jpg?632796814400000000)
Oct 10, 2006 - 08:18 AM
The command prompt is run like this:
"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\OSQL.EXE" -E
Then write these lines to restore the database:
restore database mydbname from DISK = 'C:\xxx\xxx\xxx' with move 'database_Data' to 'C:\Database\xxx\database_Data.mdf', move 'database_Log' to 'C:\Database\xxx\database_Log.LDF'
go
It was the "WITH MOVE" that gave me problems. If you're restoring on another machine that doesn't have the exact same directory structure, then you need to add that.
![maxmorgan59](https://data3.answerbase.com/answerbase/1720/Images/Avatars/avatar_01.jpg)
May 21, 2014 - 04:46 AM
For more inquiry read this post: http://diskdatarecovery.jimdo.com/2013/07/23/how-to-restore-lost-data-on-server
-while-running-sql-server
![langm8029](https://data3.answerbase.com/answerbase/1720/UserFiles/User1308700/profileImage1308700.jpg?635520060780000000)
Nov 19, 2014 - 11:03 AM
ting-a-new-database-using-an-mdf-file?_=1416149856104
Add New Comment![Sending...](https://quomon.com/images/loading-boxes.gif)