Learn more about SQL Server tools

mssqltips logo
giveaway
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

SQL Server install error Wait on the Database Engine Recovery Handle Failed


By:   |   Read Comments (11)   |   Related Tips: More > Install and Uninstall

Problem

Last week I was installing a SQL Server 2014 standalone instance. I did all the prerequisites and then started installing SQL Server. I did not get any warnings or errors in any of the rules or steps during the SQL Server installation wizard, but I got the below error at the end of the installation:

The following error has occurred:

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

I followed each and every pre-check before installing SQL Server, but I still got this issue. In this tip I will show how I went about troubleshooting and fixing this issue.

Solution

After many rounds of troubleshooting I decided to do some research on the web.  This was the first time I got this issue, so I had no clue about how to fix except for reading and analyzing the error log files. Interestingly, I found multiple solutions to fix this issue over the internet. Below are three options which can be used to fix this issue. I will explain the first in this tip and the remaining in future tips.

  1. Fix it by uninstalling SQL Server and then reinstalling
  2. Fix issue by using sa account
  3. Fix using by creating a login post installation and connecting to the instance in single user mode

This error comes about because the account which the user selected on the Server Configuration page during installation is somehow not able to bring the SQL Server database engine services online. Either it lacks privileges or it is corrupted. During installation of the database engine services, SQL Server tries to bring online the database services as an internal process, but due to the startup account either being corrupt or not having the appropriate privileges it fails to do so and ultimately the installation fails. There might be a possibility that someone had tried to install SQL Server previously on this machine, but failed to do so and they did not clean the machine properly during the uninstallation.

In this tip I will explain the first method about uninstalling the SQL Server instance which threw this error during installation and then start a fresh install after making a few changes during the setup. We are uninstalling it to clear the machine, so that we will not have any issues during the reinstall.

Here is the install process that failed and how I fixed it.

Step 1: Launch SQL Server setup to kick off the SQL Server installation. Complete all the required details and click the Next buttons to proceed until the last page of the setup window. Click on the install button to start the SQL Server installation.

Step 2: The installation bar will proceed until the end, but the setup will throw the below error during the installation.

Wait on the Database Engine recovery handle failed.  Check the SQL Server error log for potential causes.

When you click on OK button after reading and analyzing the error, the below screen will appear confirming that a few of the features failed to install.

SQL Server features failed to install

I decided to review the error log file to find out more about this error, but I did not get much from the error log file as shown in the below screen shot.

SQL Server Error Log File

Step 3: To move forward, I will uninstall this SQL Server instance and then reinstall it again with some minor changes. Let's go ahead and uninstall it using the "Add/Remove Program" feature in Windows. If you are not able to remove SQL Server instance then you will need to do a manual uninstallation to clean the machine. Make sure to remove all SQL Server related files from the system as well as the registry. Before removing anything from the registry create a backup of the registry first. I uninstalled this instance successfully and proceeded with the next step.

Step 4: Restart your machine after successful removal of the SQL Server instance. Now go ahead and launch the SQL Server setup again to start the SQL Server installation.

Step 5: Fill all the required details and click on Next buttons to proceed until the "Server Configuration" page. You can see below that the SQL Server database engine and SQL Server Agent service account is configured to run with NT Service\MSSQLSERVER and NT Service\SQLServerAgent. Our last installation failed due to this, so here I will change these service accounts to use the local System account to run the installation.

SQL Server Installation Server Configuration Page

Step 6: We can change both service accounts to local System. On the SQL Server Database Engine and Agent service, click the drop down option to select user NT Authority\SYSTEM which is also known as the local system account as shown below.

Select user NT Authority\SYSTEM for the SQL Server services

Step 7: Now click on the Next button and proceed with the installation by filling in the required details and clicking on the Next buttons until the end of the setup. Installation should now proceed and finish with a green status for all features as you can see in the below screenshot.

SQL Server Successful Installation

Now you can check the SQL Server services to make sure they are running. You can also connect to the database instance and run some queries to check that things are working properly.

Next Steps


Last Update:






About the author
MSSQLTips author Manvendra Singh Manvendra Singh has over 5 years of experience with SQL Server and has focused on Database Mirroring, Replication, Log Shipping, etc.

View all my tips
Related Resources





More SQL Server Solutions











Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


SQL tips:

*Enter Code refresh code     



Friday, June 02, 2017 - 6:00:43 AM - Joern Back To Top

 Thank you very much. 


Sunday, May 07, 2017 - 7:47:58 PM - harold Back To Top

 Worked perfectly on Sqlexpress 2016.  Thank you!

 


Saturday, March 18, 2017 - 6:20:12 PM - Pete Back To Top

 It worked! Thanks so much for the solution!

 


Friday, March 17, 2017 - 2:07:58 AM - S Back To Top

 Thank you so much!!! was able to install without any errors after following your instructions. 

 


Thursday, February 16, 2017 - 11:53:13 AM - Selva Back To Top

 

 thanks you , worked for me


Thursday, January 19, 2017 - 10:18:44 PM - David Shipton Back To Top

 Manvendra, I wanted you to know that your solution worked. You would think that Microsoft would default this to the system in the first place. - Thanks!

 


Saturday, January 07, 2017 - 9:32:45 PM - Darren Back To Top

Nice post. Worked perfectly.


Friday, January 06, 2017 - 2:07:25 PM - Mark Back To Top

Thank you so much for this tip. I tried to install and uninstall at least 6 times. Much appreciated.

 


Monday, January 02, 2017 - 1:38:52 PM - satish Back To Top

 

 Great tip. Thanks for the snap shots. Also if you like, you can add some screen shot showing the user should add the administrator (User as Admin) and not select Builtin/Administrators during the Windows Authentication mode / Mixed mode screen.

 


Saturday, December 10, 2016 - 10:03:26 AM - M dev Back To Top

I tried 3 times, your tip got me Success. Long live. Sincere thanks.

Monday, October 31, 2016 - 4:34:08 AM - Shatskikh Back To Top

Hi Manvendra
Thanks for your article, Do you know the RCA of this issue? As far as I know, SQL Server support the virtual service accounts. via Technet(https://technet.microsoft.com/en-us/library/dd548356(v=ws.10).aspx). So, I'm curious. Thanks you :)

 


Learn more about SQL Server tools