First time here? Check out the FAQ!
x

Import damaged SQL MDF file

0 votes
asked by (120 points)
edited by

I have a PC that had SQL 2005 running on it that has died. The OS is corrupted and can't be repaired at all.

I have managed to get the MDF file off of the machine but I can't attach it to another SQL server because it is damaged. How can I go about trying to repair this file?

2 Answers

0 votes
answered by (264k points)

There are tools that can help you open the MDF file to recover its contents, but they're shareware. I have looked for a free application and there is no result, however, if you have Microsoft SQL Server Management Studio installed, you can try the following commands:

  • Open the application and go to New Query then type the command:

enter image description here

  • Click on Execute and wait for results.
0 votes
answered by (460 points)

When MDF file does not open that mean it may be corrupt, you can go with SQL MDF Recovery software that allows to fix all issue from MDF file and import them successfully.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...