Learn more about SQL Server tools

mssqltips logo
 

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

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

Wait on the Database Engine Recovery Handle Failed SQL Server Installation Error


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

Attend these FREE MSSQLTips webcasts >> click to register


Problem

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.

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 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:

  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

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.

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

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.

Database Engine Services and SQL Server Replication Failures

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.

windows service console

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.

sql server service property

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.

sql server service property with the local system account

Step 6: Now start the SQL Server service as shown in the below screenshot.

start SQL Server Service

This time it will work and your SQL Server service will come online. Do the same exercise to bring SQL Server agent service online.

start SQL Server Service

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.

make connection with SSMS resulted in a failure

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.

Login Failed for sa

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.

make connection without password for the sa login

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.

change password of sa
Next Steps
  • 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 Update:


signup button

next tip button



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





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     



Wednesday, September 13, 2017 - 11:42:27 AM - Sindhu Bhat Back To Top

 Hi Manvendra, I have received same error but in clustered instance ( first node), I am not able to start instance with local system account, any other sugestion ?

 

Regards,

Sindhu

 


Learn more about SQL Server tools