Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an mdf file and log file in my database. How to restore the database using this files.Please help me
Posted

You need to attach it to database server. Try this:

http://msdn.microsoft.com/en-us/library/ms190209.aspx[^]

hope it helps :)
 
Share this answer
 
Comments
sravani.v 17-Apr-12 4:33am    
My 5!
Try this:

Place the mdf and log files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\

Right click on Database->Attach->Add->select your mdf file path->click on "ok".

It may help you.
 
Share this answer
 
v2
Comments
devausha 17-Apr-12 3:43am    
Thank you
sravani.v 17-Apr-12 4:10am    
Welcome devausha
Start SQL Server Management Studio
Right click on Databases and choose ATTACH
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900