# .mdf file

**URL:** https://forum.kirupa.com/t/mdf-file/634403
**Category:** programming
**Created:** [March 29, 2016, 6:30pm UTC](https://forum.kirupa.com/t/mdf-file/634403 "2016-03-29T18:30:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bullfrogert](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bullfrogert/32/7567_2.png) [@bullfrogert](https://forum.kirupa.com/u/bullfrogert)
#### Post date: [March 29, 2016, 6:30pm UTC](https://forum.kirupa.com/t/mdf-file/634403/1 "2016-03-29T18:30:37Z")

</div>

Good afternoon.

So there SCCM2012r2 mode primary site (PS), is 5t secondary site (SS).

It so happened that the file is broken: master.mdf or mastlog on primary site, do not start sql-server, and SQL + SCCM one a server, there is no fresh backups, the last master.mdf (mastlog.ldf), 5-month-old, Compare 55-bit differences found with a broken. In an isolated network start his sccm2012r2 (primary site) to those files - start. After starting the differences between the broken files to and from backup (but where was the launch) - it was 48.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![classhopper](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/classhopper/32/7612_2.png) [@classhopper](https://forum.kirupa.com/u/classhopper)
#### Post date: [May 5, 2016, 9:03pm UTC](https://forum.kirupa.com/t/mdf-file/634403/2 "2016-05-05T21:03:17Z")

</div>

When you can’t restore .sql data via standard solutions make use of guide below or if even the guide can’t help you, it might be that your sql data was severely corrupted and you may get more powerful tips on next sources [Recovery Toolbox for SQL Server](https://sql.recoverytoolbox.com/)

---

<div class="post-metadata">

### Author: ![johnwalker10](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@johnwalker10](https://forum.kirupa.com/u/johnwalker10)
#### Post date: [December 14, 2016, 5:05pm UTC](https://forum.kirupa.com/t/mdf-file/634403/3 "2016-12-14T17:05:59Z")

</div>

- Run SQL Server setup.exe
- Open Command Prompt and move to \servers folder

`Start /wait setup.exe /qn INSTANCENAME=<InstanceName> REINSTALL=SQL_Engine REBUILDDATABASE=1 sapwd=<NewStrongPassword>`

> **qn** will suppress the dialog boxes and errors while processing the command.

Or you can take the help of [MDF data recovery tool](http://www.sqlmdfviewer.org/recovery/) which allows you to repair your .mdf file.
