title: How to recreate SQL Server MSSQLServer windows user for a SQL Server 2014 SP1 installation
body: <p>I had a new machine which windows crashed and I had to do a Windows reset which reinstalled Windows. Afterwards I deleted the old app user accounts in the C:\Users folder since the reinstall didn't delete it, these included SQL Server MSSQLServer and .net accounts because I was going to install all the apps from scratch I decided to clear it up and delete it.</p>
  
  <p>I then ran SQL Server 2014 SP1 setup selecting database engine, client connectivity and Management Studio on default instance <code>MSSQLServer</code>
  using mixed mode authentication and added my own <code>sa</code> password and my current windows user.</p>
  
  <p>At the end of my installation I notice the installer takes a very long time at the following step</p>
  
  <pre><code>SqlEngineDBStartConfigAction_install_configrc_Cpu64
  </code></pre>
  
  <p>I then get an error</p>
  
  <blockquote>
    <p>The following error occurred:<br>
    Could not find the Database Engine startup handle.</p>
  </blockquote>
  
  <p>Logs </p>
  
  <blockquote>
    <p>Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      Reason for failure:            An error occurred during the setup process of the feature.
      Next Step:                     Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
      Component name:                SQL Server Database Engine Services Instance Features
      Component error code:          0x851A0019
      Error description:             Could not find the Database Engine startup handle.
      Error help link:               <a href="http://go.microsoft.com/fwlink?LinkId=20476&amp;ProdName=Microsoft+SQL+Server&amp;EvtSrc=setup.rll&amp;EvtID=50000&amp;ProdVer=12.0.4100.1&amp;EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&amp;EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025" rel="nofollow">http://go.microsoft.com/fwlink?LinkId=20476&amp;ProdName=Microsoft+SQL+Server&amp;EvtSrc=setup.rll&amp;EvtID=50000&amp;ProdVer=12.0.4100.1&amp;EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&amp;EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025</a></p>
  </blockquote>
  
  <p>I open SQL Server configuration manager Services and noticed my <code>MSSQLServer</code> doesn't start up because it runs as <code>NT Service\MSSQLSERVER</code> user. I change that to local system account and start the service and the service runs.</p>
  
  <p>However when I open SQL Server Management Studio and try to connect to the database engine I can't connect with neither my windows user I added during the SQL Server setup nor the sa user with password I specified.</p>
  
  <blockquote>
    <p>Cannot connect to PCName. Login failed for user PCName\User. Microsoft SQL Server Error 18456</p>
  </blockquote>
  
  <p>When I uninstall SQL Server and reinstall it I get the same issue. Even when I delete the  program files directory C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER</p>
  
  <ol>
  <li><p>How do I get it to work?</p></li>
  <li><p>Why does a new SQL Server 2014 SP1 installation not create the <code>MSSQLServer</code> user?</p></li>
  <li><p>How to I create the <code>MSSQLServer</code> user manually and what permissions and groups do I assign to it?</p></li>
  </ol>