Learning While Aging

[Fixed] Error Code 0x851A001A When Installing SQL Server on Window 11

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:

  1. Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device
  2. On the Edit menu, point to New, and then select Multi-String value. Name it ForcedPhysicalSectorSizeInBytes
  3. Modify the new value, and type in * 4095. Select OK and close the Registry editor
  4. 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://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size

https://blog.nimblepros.com/blogs/sql-server-windows-11-fiasco

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x