<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>Lowyat.NET: Latest topics by EmerysMontgomery</title>
        <description></description>
        <link>http://forum.lowyat.net/</link>
        <lastBuildDate>Sat, 20 Jun 2026 16:43:40 +0800</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>Recover data from .mdf file</title>
            <link>http://forum.lowyat.net/topic/3843740</link>
            <description>Dear All,&lt;br /&gt;Hi. I have a server with the following installed:&lt;br /&gt;Windows server 2008 R2 SP1&lt;br /&gt;SQL Server 2008 R2&lt;br /&gt;My production database was &amp;quot;mydb&amp;quot;&lt;br /&gt;The production database files were stored as below :&lt;br /&gt;1) &amp;quot;mydb.ndf&amp;quot; file was stored at &amp;quot;C:&amp;#092;Program Files&amp;#092;Microsoft SQL Server&amp;#092;MSSQL10_50.MSSQLSERVER&amp;#092;MSSQL&amp;#092;DATA&amp;#092;mydb.ndf&amp;quot;&lt;br /&gt;2) &amp;quot;mydb.mdf&amp;quot; and &amp;quot;mydb.ldf&amp;quot; files were stored at D:&amp;#092;myfolder&lt;br /&gt;Due to some reasons the Hard disk crashed and I lost my C:&amp;#092; drive leaving me with only the &amp;quot;.mdf&amp;quot; and &amp;quot;.ldf&amp;quot; database files. &lt;br /&gt;I have re-installed the Windows server 2008 R2 SP1 and SQL Sever 2008 R2. Now when I try to &amp;quot;re-attach&amp;quot; &amp;quot;mydb&amp;quot;, by following method :&lt;br /&gt;Right click Databases-&amp;gt;Attach-&amp;gt;Add, select the .mdf file and click OK&lt;br /&gt;I get the following error : &lt;br /&gt;&amp;quot;Unable to open the physical file C:&amp;#092;Program Files&amp;#092;Microsoft SQL Server&amp;#092;MSSQL10.MSSQLSERVER&amp;#092;MSSQL&amp;#092;DATA&amp;#092;mydb.ndf&amp;quot;. Operating system error 2: &amp;quot;2(The system cannot find the file specified.)&amp;quot; (Microsoft SQL Server, Error : 5120)&lt;br /&gt;My Query :&lt;br /&gt;How can I recover/restore the database from just .mdf and .ldf files ?&lt;br /&gt;I&amp;#39;ve tried the following :&lt;br /&gt;1) Creating a &amp;quot;mydb.ndf&amp;quot; file and saving at the same location but SQL server is not able to map it to &amp;quot;mydb.mdf&amp;quot;.&lt;br /&gt;2) Creating a new &amp;quot;mydb&amp;quot; and over-writing &amp;quot;mydb.mdf&amp;quot; and &amp;quot;mydb.ldf&amp;quot; to the newly created location.&lt;br /&gt;Please advice a solution as this recovery is very crucial for me.&lt;br /&gt;</description>
            <author>EmerysMontgomery</author>
            <category>Codemasters</category>
            <pubDate>Tue, 19 Jan 2016 23:25:27 +0800</pubDate>
        </item>
    </channel>
</rss>
