Well, the title explains the pain!

We had the same issue recently in one of the machines, which was avoided upgrading just because of this issue for the last 4 months. every time we upgrade it and SQL stops working so we roll back gracefully as we don’t want to dig around to fix the issue.

But this time, I was free to figure out why it was not working. I entirely relied on Google and Microsoft Search results. but writing here as it is working solution out of heaps of search results in my case

Test case #1: We installed fresh  Windows 11 when we purchased the laptop. The following message for the Database Engine Services component of SQL Server:

Feature: Database Engine Services
Status: Failed
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 rerun the setup process.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

 

Scenario #2: After the failed first case, we tried to downgrade to Windows 10. I installed any version of SQL Server, which was working fine. Then, upgrade the OS on the device to Windows 11. When you try to start SQL Server on a Windows 11 device, the service fails to start, and in the SQL Server error log, you notice entries similar to:

 

MSSQLSERVER
Error: 1067. The process terminated unexpectedly.

Faulting application name: sqlservr.exe, version: 2019.150.4153.1, time stamp: 0x60f610ce
Faulting module name: ntdll.dll, version: 10.0.22449.1000, time stamp: 0x05321977
Exception code: 0xc0000005
Fault offset: 0x0000000000035f8e
Faulting process id: 0x2ad4
Faulting application start time: 0x01d7a2f27a6bc3c3
Faulting application path: C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 1796a874-3c3f-467f-a923-4cfe5b7ae754
Faulting package full name:
Faulting package-relative application ID:

So here is the test case

Step 1:  we have installed SQL server on c: so in our case

fsutil fsinfo sectorinfo c:

And check the value of PhysicalBytesPerSectorForAtomicity and PhysicalBytesPerSectorForPerformance,

if any one of these shows you 4096: that’s where the real problem is, which stops the SQL service from starting.

Step 2: Open the command prompt in administrator mode and  run the following command

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

Step 3: Verify step 2 by running the following command

REG QUERY “HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device” /v “ForcedPhysicalSectorSizeInBytes”

Step 4: Restart the device, and voila! It will start working

 

Please share your experience if it is not working even after these steps. I will be happy to help.

Thanks

Vinay