How to restore Master db in SQL Server 2008 Express?
<p>Please can I ask for your assistance in investigating as to why I cannot restore the master db from a recent backup?</p>

<p>Physical copies taken of <code>.mdf</code> and <code>.ldf</code> master files (just in case!) and then I've recreated a corrupted <code>master</code> database by manually deleting content from the <code>.mdf</code> file using Notepad to simulate disk corruption. </p>

<p>Subsequently, SQL Server (<code>MSSQLSERVER</code>) service will not start which is the scenario I'm trying to resolve. </p>

<p>Actions taken to backup <code>Master</code> database:</p>

<p>Prior to corrupting <code>master</code>, a backup was taken using following command:</p>

<pre><code>BACKUP DATABASE master 
TO DISK = 'C:\Temp\MasterBK.DAT' 
WITH FORMAT, NAME = 'Full Backup of master'
</code></pre>

<p>Actions taken to restore:</p>

<p>Various different attempts to start SQL Servre service in single-user mode, including:</p>

<pre><code>-mSQLCMD 
-m"SQLCMD"
sqlservr.exe -m
NET START MSSQLSERVER /m
</code></pre>

<p>Tried adding <code>-m</code> into Startup Parameters in SQL Server Configuration Manager</p>

<p>Error received on restore</p>

<blockquote>
  <p>-mSQLCMD is not a recognised as an internal or external command<br>
  Service did not start in a timely manner</p>
</blockquote>

<p>Version Information:</p>

<pre><code>[Windows XP]

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86) 
Express Edition on Windows NT 5.1 &lt;X86&gt; (Build 2600: Service Pack 3)
</code></pre>