Netklip


 

Hello guys

My server crashed  but luckily  I was not able to get back my files with help of recovery software.

Now, all I have from the database are just sql server database primary data .mdf and sql server databaseTransaction Log Files .ldf. I need to restore   these data back to sql server.

Please could someone tell me how to restore these two file types back to my sql sever 2007 database

Thanks

netboy

 

 





Re: How do I restore sql server database primary data back .mdf

Madhu K Nair


I hope there were no secondary datafiles (.ndf) files... If you had only one mdf and Ldf file then use dbattach method

Refer sp_attach_db in BOL and also these links

http://msdn2.microsoft.com/en-us/library/ms189625.aspx

http://www.databasedesign-resource.com/moving-the-database.html