Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / SQL Server / SQL Server: Could Not Find the Database Engine Startup Handle

February 6, 2025

SQL Server: Could Not Find the Database Engine Startup Handle

I get a strange error when installing MS SQL Server 2019 on Windows Server 2022. The installation fails with the error “Could not find the Database Engine startup handle“.

Could not find the Database Engine startup handle - SQL Server 2019 Install error

The SQL installation log (summary.txt) contains the following error:

Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.

A similar error may occur when trying to install SQL Server 2022 Express edition:

Unable to install SQL Server
Exit code: -2061893607
Error description: Could not find the Database Engine Startup handle.

sql server express: Unable to install SQL Server Could not find the Database Engine Startup handle

SQL Server installation error possible causes:

  • The service account doesn’t have permission to start the Database Engine service.
  • The drive on which the SQL Server is installed is formatted with a sector size greater than 4 KB (this problem is specific to Windows 11 and Windows Server 2022)
  • TLS 1.2 protocol support is disabled on the server (required for SQL Server 2016 and newer)

When using the default Microsoft SQL Server installation settings, an unprivileged account of the form NT Service\MSSQLSERVER is used to start the SQL Server service. This account may not have sufficient privileges to start the SQL Server service, so when the installer tries to start the service, it fails with the error ‘Could not find the Database Engine startup handle’.

This error may also indicate that a previous attempt was made to install SQL Server on the computer, but the files and services left behind after the installation were not properly removed.

To fix SQL Server installation error:

  1. Correctly uninstall all SQL Server components via the Control Panel and restart the server. After the uninstall, check that there are no SQL Server components on the computer:
    wmic product get Name,IdentifyingNumber | findstr /i "SQL"
    If any features remain, remove them by their GUIDs using the command:
    msiexec /x {guid}
    Check that there are no files or folders in C:\Program Files\Microsoft SQL Server\MSSQLxxx.xxx) cmd: listinstalled sql server features
  2. Perform a clean installation of the SQL Server
  3. On the Server Configuration tab, change the account used to run the SQL Server database engine from NT Service\MSSQLSERVER to NT AUTHORITY\SYSTEM.install Sql Server under NT AUTHORITY\SYSTEM
  4. Continue the SQL Server installation. The error shouldn’t appear again.

After the installation, change the account used to run the SQL Server Database Engine service to a non-privileged account (this improves security). This account doesn’t necessarily need to have local administrator permissions (it only needs permissions in SQL Server security settings). You can use accounts with sysadmin privileges: NT Service\MSSQLSERVICor NT Service\SQLSERVERAGENT, or a service domain account. To change the account under which SQL Server is running:

  1. Run the SQL Server Configuration Manager and go to SQL Server Services
  2. Click SQL Server (MSSQLSERVER), then click Browse and in the “This account” field specify the account, under which the service must be run, or use a gMSA  (Group Managed Service Account). Enter the user password and save the changes; Changing The SQL Server Service Account In SQL
    The specified account must have permission to log on as a service.  Check the GPO option Log on as a service under Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment.
  3. Restart SQL Server services

Another possible cause of this SQL Server installation error on Windows 11 and Windows Server 2022 is trying to place the master database file on a partition formatted with a sector size larger than 4 KB. The following warning will appear in the SQLServer_ERRORLOG_ log in this case

Cannot use file C:\MSSQLSERVER\MSSQL\DATA\master.mdf because it was originally formatted with sector size 4096 and is now on a volume with sector size 16384. Move the file to a volume with a sector size that is the same as or smaller than the original sector.

Check the allocation unit size on the drive:

fsutil fsinfo sectorinfo c:

In this example, the PhysicalBytesPerSectorForPerformance sector size value is over 4K.

sql-server large sector size - PhysicalBytesPerSectorForPerformance

To fix this, format the partition where the master database will be located with a cluster size of 4K or install SQL Server on a different drive. As a workaround, configure a registry parameter that forces the sector size to be emulated as 4 KB (Troubleshoot errors related to system disk sector size greater than 4 KB).

REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f

Restart the computer and perform a clean installation of SQL Server.

Check that TLS 1.2 encryption support is enabled on the Windows host where you are installing SQL Server. It is a prerequisite for installing SQL Server 2016 and later (SQL Server 2017, 2019, and 2022). Use the IISCrypto tool to check that TLS 1.2 is enabled (see How to enable support for the TLS 1.2 protocol in Windows).

These methods can help you fix the “Could not find the Database Engine startup handle” with any version of SQL Server (2022, 2019, 2016, 2014, 2012, or 2008 r2).

4 comments
3
Facebook Twitter Google + Pinterest
SQL ServerWindows Server 2019Windows Server 2022
previous post
How to Disable UAC Prompt for Specific Applications in Windows
next post
How to Stop an Unresponsive (Stuck) Virtual Machine on VMware ESXi

Related Reading

How to Obtain SeDebugPrivilege when Debug Program Policy...

March 11, 2024

Upgrade Microsoft SQL Server Evaluation Edition to Standard/Enterprise

March 12, 2024

Configuring Always-On High Availability Groups on SQL Server

March 12, 2024

4 comments

Max February 2, 2022 - 9:26 am

THANK YOU!
I had this problem fpr two days and i couldn’t figure out whats wrong.
Every other solution didn’t work, but this finally worked!

Reply
Pearl February 18, 2022 - 1:19 pm

I encountered the same issue. For me installing TLS 1.2 fixed the issue.

Reply
admin February 18, 2022 - 1:24 pm

thanks for the info!
Did the problem appear on Windows Server 2012 r2?

Reply
Sławek October 23, 2024 - 7:05 pm

I had this problem in Windows 11 Pro. Your advice helped. Thank you very much!

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Configuring Windows Protected Print Mode (WPP)

    May 19, 2025
  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
    Footer Logo

    @2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


    Back To Top