If you try to install MS SQL Server or LocalDB on a Windows 11 computer, especially a Samsung computer, you will most likely encounter an error with code 0x851A001A. This post will show you how to fix this error.
The default disk sector size on Windows 11 is 4KB but some new computers may have a sector size greater than 4KB, such as Samsung computers with new SSDs. This will cause the installation of SQL Server to fail because SQL Server only supports sector sizes of 512 bytes and 4KB. Now we know the cause of the error, let’s see how we can fix the error.
Solution:
The solution is to create a registry key to force Windows 11 to work like Windows 10 which will force the sector size to be emulated as 4KB. To create the registry key, press the Windows key and R, then type in regedit and click OK to launch Registry Editor. Follow the following steps:
- Navigate to
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device
- On the Edit menu, point to New, and then select Multi-String value. Name it
ForcedPhysicalSectorSizeInBytes
- Modify the new value, and type in * 4095. Select OK and close the Registry editor
- Restart the computer
After restarting the computer, in a Windows Command Prompt window, run the following two commands:
Sqllocaldb delete mssqllocaldb
Sqllocaldb create mssqllocaldb -s
Now the SQL Server should work correctly.
Hope this helps.
References:
https://blog.nimblepros.com/blogs/sql-server-windows-11-fiasco