1

The Windows os on my server crushed. I do have disk file access. I can get the mdf and ldf files of my sql 2008 database is it possible to restore the database from those files, and how to do it ? Thanks, Dani

2 Answers 2

6

Yes, as long as the files didn't get corrupted you can do a reattach. In SQL Server Management Studio, right-click on Databases on your new server instances and choose Attach Database. It will ask you the location of your mdf file, and you might also have to browse to your ldf file. Should be no problem. Might take a minute depending on how much in your transaction log has not been committed.

Here's the MSDN article for it.

2
  • Thanks, I'll try and post the results here :-) looks promising
    – Dani
    Oct 4, 2009 at 17:34
  • OK, Everything worked as you said :-) just needed to recreate the users.
    – Dani
    Oct 5, 2009 at 9:47
0

Attach Database

If you have the files you can copy them over to the new database server and "Attach Database" via the MS-SQL GUI.

You'll be prompted for the locations of the files and then the system will grind away for a bit and (hopefully if there's no corruption) attach the database.

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .