Have you encountered the error message “Wait on the Database Engine Recovery Handle Failed” during the installation of SQL Server? This error can be frustrating, especially when you have followed all the prerequisites and installation steps correctly. In this article, we will explore the possible causes of this error and provide you with a step-by-step solution to fix it.
Possible Causes
The error “Wait on the Database Engine Recovery Handle Failed” occurs when the account selected to run the SQL Server services during installation is unable to bring the SQL Server database engine services online. This can happen due to the following reasons:
- The startup account selected during installation is corrupt or does not have appropriate privileges.
- A previous installation of SQL Server on the machine was unsuccessful, leaving behind remnants that interfere with the current installation.
Solution
To fix the “Wait on the Database Engine Recovery Handle Failed” error, you can follow these steps:
- Uninstall the SQL Server and then reinstall it again, ensuring that you select a valid startup account with appropriate privileges.
- Fix the issue using the “sa” account. If the “sa” account is corrupted or not working, you can try connecting to the SQL Server instance in single user mode and create a new login with SQL Server System Admin (sa) rights.
Step 1: Reinstall SQL Server
Launch the SQL Server setup and complete all the required details. Make sure to select a valid startup account with appropriate privileges. Proceed with the installation until the last page and click on the “Install” button to start the SQL Server installation.
Step 2: Error During Installation
During the installation process, you may encounter an error indicating that some features failed to install. Take note of this error message.
Step 3: Check SQL Server Services
Open the Windows Services console by running the “services.msc” command. Look for the SQL Server services and check their status. If they are stopped, try starting them. If you encounter permission issues, proceed to the next step.
Step 4: Change Service Account
Open the properties of the SQL Server service and go to the “Log On” tab. Change the service account to either “Local System” or a valid domain account. Apply the changes.
Step 5: Start SQL Server Service
Start the SQL Server service and ensure that it comes online. Repeat the same process for the SQL Server Agent service.
Step 6: Connect to SQL Server Instance
Launch SQL Server Management Studio and try connecting to the SQL Server instance. If you are unable to connect using a Windows account, try connecting using the “sa” account. If the “sa” account is not working or corrupted, proceed to the next step.
Step 7: Single User Mode
Since you are locked out of the SQL Server instance, you need to change it to single user mode. Open a command prompt window and navigate to the SQL Server’s Binn directory. Run the command “sqlservr -m” to start SQL Server in single user mode.
Step 8: Connect to SQL Server Instance
Open another command prompt window and connect to the SQL Server instance using the “sqlcmd” utility.
Step 9: Create a New Login
Once connected to the SQL Server instance, create a new login with SQL Server System Admin (sa) rights. This will give you access to the SQL Server.
Step 10: Restart SQL Server Services
Close the command prompt and restart the SQL Server services. Validate your access by connecting to the SQL Server using the newly created login.
By following these steps, you should be able to fix the “Wait on the Database Engine Recovery Handle Failed” error and regain access to your SQL Server instance.
Remember to always double-check the prerequisites and installation steps to avoid encountering such errors in the future.