Click here to Skip to main content
14,330,541 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

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

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

hope it helps :)
   
Comments
sravani.v 17-Apr-12 4:33am
   
My 5!
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.
   
v2
Comments
devausha 17-Apr-12 3:43am
   
Thank you
sravani.v 17-Apr-12 4:10am
   
Welcome devausha
Rate this:
Please Sign up or sign in to vote.

Solution 3

Start SQL Server Management Studio
Right click on Databases and choose ATTACH
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100