SQL Server install error Wait on the Database Engine Recovery Handle Failed
By: Manvendra Singh | Updated: 2016-10-31 | Comments (43) | Related: More > Install and Uninstall
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.
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.
- Fix it by uninstalling SQL Server and then reinstalling
- Fix issue by using sa account
- 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.
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.
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.
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.
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.
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.
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.
- Always follow best practices when installing SQL Server.
- Explore more knowledge on SQL Server Database Administration tips
About the author
View all my tips
Article Last Updated: 2016-10-31