Wait on the Database Engine Recovery Handle Failed SQL Server Installation Error
Last week I was installing a SQL Server 2014 standalone instance. I took care of all the prerequisites and then started installing SQL Server. I did not get any warnings or errors during the SQL Server installation, 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 still I got this issue. This tip will help you fix this issue if you are stuck in such a circumstance without having to uninstall the failed SQL Server installation.
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 second optoin in this tip and the remaining in options in other tips.
Below are three options which can be used to fix this issue:
- 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
I explained the first option in this tip and in this tip I will explain how to fix this issue without uninstalling the failed installation of SQL Server with the help of the sa account.
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. Fill all the required details and click on the Next buttons to proceed to 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 the OK button after reading and analyzing the error, the below screen will appear confirming that a few of the features failed to install.
Step 3: As we can see in the above screenshot, the SQL Server database engine failed to install on this machine, but surprisingly the SQL Server services have been created in the windows services console. I launched the windows services console by running the services.msc command. You can see all SQL Server services in the below screenshot even though the installation showed that it failed.
Step 4: You can see that the SQL Server services are stopped and not running, so I decided to start them. Here is where I was wrong, because when I tried to start the SQL Server service it failed to start showing some permission issues. I decided to check the service account of this service. I launched the service property and choose the "Log On" tab. We can see the default service account which is generally used by the SQL Server setup to configure the SQL Server services during installation. We changed the same service account from NT Service\MSSQLSERVER to Local System to run the installation successfully in our last tip.
Step 5: Now change this service account to either local system or a valid domain account. Here I have chosen Local System and clicked on Ok to apply the changes.
Step 6: Now start the SQL Server service as shown in the below screenshot.
This time it will work and your SQL Server service will come online. Do the same exercise to bring SQL Server agent service online.
Step 7: Next we will try to connect to the SQL Server instance. Launch SQL Server Management Studio and enter the instance name and click on the connect button.
You can see we have failed to connect to the SQL Server instance using a Windows account, so next we will try to connect using the sa account.
We were also not able to connect and as I mentioned in the beginning, the reason is that the account which we selected on the Server Configuration page window to run the SQL Server services during installation is somehow not able to bring the SQL Server database engine services online and a few of the installation steps like creating logins, assigning the sa password are applied to SQL Server once SQL Server is installed and running. Since SQL Server did not start these steps were not applied.
Step 8: I tried to connect to the SQL Server instance using the sa account with a blank password and this worked.
Step 9: The next step is to assign a password to your sa account for security reasons. If you don't anyone can connect to your database instance.
- Make sure to change the sa password to secure your database instance. Go ahead and create all required logins with necessary access levels. Now your SQL Server instance is ready to use.
- Explore more knowledge with these SQL Server Database Administration tips
Last Updated: 2016-11-18
About the author
View all my tips