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:
- Run PowerShell as an administrator.
- 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"
- Un-install SQL Server and Reboot the server.
- Verify the fix (explained below) and Install SQL Server again.
- 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.