Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 How to restore .mdf file in sql ?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 03/19/2015 :  17:43:42  Show Profile  Reply with Quote
There was a failure of the system how to restore .mdf file in sql server 2005 how to fix?

Almighty SQL Goddess

38200 Posts

Posted - 03/19/2015 :  17:55:31  Show Profile  Visit tkizer's Homepage  Reply with Quote
You could try attaching the database, however that might not work. Restore from backup is your best bet. Please don't say you don't have ANY backups.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Posting Yak Master

212 Posts

Posted - 04/07/2015 :  05:51:45  Show Profile  Visit prett's Homepage  Reply with Quote
Detach the database and move your .mdf file from save location. Create new database with the same name, same files,location and size. Now stop your server. Swap the .mdf file of new database to your old one. Now start the server again.
Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 04/09/2015 :  01:43:43  Show Profile  Visit jackv's Homepage  Reply with Quote
What exactly are you able to retrieve from the failed system?have you recovered the system (partial) or are you attempting to restore to a new sql server instance?

Jack Vamvas
Go to Top of Page

Yak Posting Veteran

52 Posts

Posted - 05/27/2015 :  05:18:07  Show Profile  Reply with Quote
You must run DBCC CHECKDB command and determine the errors the try to run DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000