Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
Thanks, I'll try and post the results here :-) looks promising –  Dani Oct 4 '09 at 17:34
    
OK, Everything worked as you said :-) just needed to recreate the users. –  Dani Oct 5 '09 at 9:47

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!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.