• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 824
  • Last Modified:

How to restore MSSQL DB with .MDF and .LDF files?

Hi

I just have 2 files a.MDF and a.LDF.
How to restore MSSQL DB with a.MDF and a.LDF files?
If I create a new DB named 'a' , it shows DB already exist and cannot create a new one.

Thanks
0
techques
Asked:
techques
1 Solution
 
f_o_o_k_yCommented:
If you have .mdf and .ldf files:
1. Copy those files to apropriate location for example Data catalog under MS SQL instance folders
2. run management stuido
3. right click databases
4. atach databe
5. show location of mdf file
6. click OK


If you have database with the same name remove it first.

Now you have your database running
You might have problem with security (database users) but you database is working.

Best Regards
FooKy
0
 
St3veMaxCommented:
The above will work assuming you dont already have files in there with the same name. If this is the case; rename them but keep the extensions and they try the above steps again.

HTH
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now