Fix Microsoft SQL Server installation error: Error waiting for the Database Engine recovery handle

Current SQL Server versions (up to SQL Server 2022) might have incompatibility issue with modern NVMe disks with system disk sector size greater than 4 KB. This causes the installation to fail at the final step with the following error:

Error waiting for the Database Engine recovery handle. Review SQL Server error logs for possible causes.

 

This can be fixed by adding a registry key ForcedPhysicalSectorSizeInBytes with value 4095 to force the PhysicalSectorSize size to be in the supported range (4KB).


Please follow these steps to fix the issue:

 

  1. Run PowerShell as an administrator.
  2. Run the following command to add the registry key:
    New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name   "ForcedPhysicalSectorSizeInBytes" -PropertyType MultiString        -Force -Value "* 4095"​
  3. Un-install SQL Server and Reboot the server.
  4. Verify the fix (explained below) and Install SQL Server again.
  5. Done. It should work!

 


Verify the fix

 

After rebooting the system and before you re-install SQL server, apply this PowerShell command to check the PhysicalSectorSize value:

Get-Disk | ft Number,FriendlyName,LogicalSectorSize,PhysicalSectorSize

 

Output should look like this where PhysicalSectorSize is 4096:

Number FriendlyName               LogicalSectorSize PhysicalSectorSize
------ ------------               ----------------- ------------------
     0 SAMSUNG MZQL21T9HCJR-00A07               512               4096

 

 

more information on learn.microsoft.com website.

  • windows server, sql server
  • 78 Users Found This Useful
Was this answer helpful?

Related Articles

How to change administrator username on windows server 2019/2022 and later

Changing the administrator username is very important for your Windows server security.To change...

How to add a secondary static IP to windows server

Method #1 To add a secondary IP address to your Windows Server, follow these steps: Step 1:...

Change remote desktop (RDP) port on Windows Server 2019/2022 (Powershell)

It's highly recommended to change windows remote desktop default port for added security. You...

How to change administrator password on Windows Server 2016/2019/2022

To change admin/user password on Windows Server 2016/2019/2022, please apply the following steps:...

How to fix clipboard issues on windows server 2016/2019

If you experience difficulties with the clipboard (copy/paste) on your windows server 2016...