Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Recover .mdf file of SQL server

Sep 7, 2015 12:13PM PDT

I am trying to use my database file which is in .mdf format and created on the date 14 July. Whenever i try to use my file in order to restore and update the database, it show the error message of corruption and i can't able to open them.

So i am urgent looking for a reliable solution which help to recover and restore .mdf file of SQL server.

Discussion is locked

- Collapse -
Beware those spammers.
Sep 7, 2015 12:33PM PDT

This question has been asked before and the file repair replies are nothing new. That is they are the same over and over you find on google.com. That said you know if it's some file repair.com link or similar it's not someone here to help you but a spammer.

Since it was so important, why not use its backup copy?

No one I know today uses such or a Windows PC without backup.

- Collapse -
re:Recover .mdf file of SQL server
Sep 14, 2015 7:09PM PDT

Try attaching the mdf to the database.If that doesn't work you may need to go to your backups.

- Collapse -
Execute Transact-SQL command
Sep 24, 2015 11:29PM PDT

Try to execute this Transact-SQL command:
CREATE DATABASE MyDatabase ON (FILENAME = 'c:\data files\my_data.mdf'), (FILENAME = ' c:\data files\my_data.ldf') FOR ATTACH

- Collapse -
Back ups generally
Oct 4, 2015 10:09AM PDT