Fix: Unable to Install SQL Server on Windows 11

SQL Server won't install if you're using sector size larger than 4KB

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

Key notes

  • If you're not able to install SQL Server 2019 on Windows 11, the issue is most likely disk sector size.
  • This issue can be fixed by modifying the registry or by using a special flag while starting the server.

SQL Server is often used by developers as a relational database management system, and many of them reported that they are unable to install SQL Server on Windows 11.

Without the SQL Server running, their project won’t have a database it can use, so it’s crucial to fix this problem, and this guide will help you with that.

How do I download and install SQL Server on Windows 11?

1. Delete the affected registry key

  1. Press the Windows key + S and type the command prompt. Select Run as administrator from the list of results.
  2. Now run the following command: reg DELETE “HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SQL Server Management Studio” /reg:32
  3. After that, close Command Prompt.

This is a straightforward solution, and it can help if you can’t install SQL Server 2014.

 2. Check the sector size of your drive

  1. Press the Windows key + X and choose Terminal (Admin).
  2. Now run the following command. Be sure to replace C with the drive you’re installing SQL Server to. fsutil fsinfo sectorinfo C:
     
  3. Locate the PhysicalBytesPerSectorForAtomicity and PhysicalBytesPerSectorForPerformance values.

If the values are different, locate the one that has a higher value. If that value is higher than 4096 you need to make a few changes in the registry by doing the following:

  1. Start Command Prompt as administrator.
  2. Run the following command to add the key: REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
  3. Run the following command to validate if the key is added successfully:
    REG QUERY "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes"

If you don’t feel comfortable modifying the registry and changing the disk sector size, you can always install SQL Server on a different drive. Just check the drive with fsutil fsinfo sectorinfo command and make sure its values aren’t higher than 4096.

3. Set the trace flag to 1800

  1. Open the command line.
  2. Now run the following command: DBCC TRACEON (1800, -1);
  3. Close the command line tool.

By modifying startup parameters you’ll force the SQL Server to use 4 KB as the disk sector size for read and write processes.

Why is SQL Server not installing?

  • Issues with certain registry keys can cause this problem to appear.
  • A sector size that is larger than 4KB is the common cause of this problem.

Microsoft is fully aware of this issue, and according to them, some newer storage devices will use higher block sizes than the supported 4-KB sector size used by SQL Server.

Hopefully, this issue will be resolved when Microsoft upgrades its software. Speaking of upgrades, we have a great guide on how to upgrade from SQL Server 2008, so be sure to check it out.

Upgrading will also prevent various compatibility issues such as the Operating system is not supported by SQL Server error.

Have you found a different way to fix this problem? If so, let us know in the comments below.

More about the topics: sql server, Windows 11 Fix

User forum

0 messages