Fix Unable to Install SQL Server on Windows 11

Microsoft SQL Server is a relational database management system (RDBMS) used in many enterprise-level companies. It provides a secure and scalable environment for storing, managing, and retrieving data. However, when some users tried installing SQL Server to give their project a database, they failed. In this post, we will see what you can do if you are unable to install SQL Server on your Windows computer.

Unable to Install SQL Server on Windows 11

SQL Server

Express Edition

Unable to install SQL Server (setup.exe).

Exit code (Decimal): -2061893606Error description: Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes

Note: You may face the issue with SQL Server 2016, 2019 or 2022 or Developer Edition. Regardless, you can follow the solutions mentioned here.

Fix Unable to Install SQL Server on Windows 11

If you are unable to install an SQL server, follow the solutions mentioned below.

  1. Install the latest version of the SQL server
  2. Delete the affected registry key
  3. Make changes to the sector size of the drive

Let’s get started.

1] Install the latest version of the SQL server

Windows 11 does not support older versions of SQL servers. If you are trying to install SQL Server 2016 and older versions on a Windows computer, you are getting stuck and are unable to Install SQL Server on Windows 11. Windows 11 does not support that version of the software. So in this scenario, you could download and install the latest version of SQL. Hopefully, after downloading and installing the newer version of the SQL server, your issue will be resolved.

2] Delete the affected registry key

In this solution, we will delete the registry keys that are related to the previously installed version of SQL Server. Even if you don’t have any instance of SQL Server installed on your system, you should still delete the files mentioned hereinafter as during the installation process they are created and can hinder another attempt of installation. Deleting the affected registry key should be done with caution, as we know that Windows Registry is a database that contains information and settings for all hardware, software, and users. That is why, create a backup of the registry before proceeding. Once done, follow the steps mentioned below.

Open Registry Editor.

Now, delete the following keys.

HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSSQLServer

Now, navigate to

 HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall

and then delete all the keys associated with SQL Server.

Then, move to

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices

and do the same.

Finally, restart the system.

Hopefully, this will do the job for you.

3] Make changes to the sector size of the drive

The SQL server installation is influenced by the potential impact of the disk sector size. SQL Server is compatible with 4 KB of sector size, which is represented by 4096, if the size is any different, it will not be compatible.

Let’s check the sector size of the drive:

  • Press the Windows + X key and select Terminal(Admin) or open Command Prompt as administrator.
  • Enter the following command and make sure to replace the C drive if you are installing the SQL server in other drives.
fsutil fsinfo sectorinfo C:
  • Find out the PhysicalBytesPerSectorForAtomicity and PhysicalBytesPerSectorForPerformance values.
  • Old hard drives often use a 512-byte sector size, while newer Advanced Format (AF) drives typically use a 4K (4096-byte) sector size. If the values are different here, then you should locate the one that has a higher value. If the sector size value is higher than 4096 then it needs some changes in the registry.
  • Open the Command Prompt as administrator.
  • Enter the following command to add the key:
REG ADD "HKLMSYSTEMCurrentControlSetServicesstornvmeParametersDevice" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
  • Run the following command to confirm if the key is added successfully:
REG QUERY "HKLMSYSTEMCurrentControlSetServicesstornvmeParametersDevice" /v "ForcedPhysicalSectorSizeInBytes"
  • Now make sure the disk sector size is not higher than 4096.
  • Enter the following command:
fsutil fsinfo sectorinfo C:
  • This command will display information about the sectors per cluster on the specified drive.

Finally, check if the issue is resolved.

We hope that you can resolve the issue using the solutions mentioned in this post.

Read: Managed SQL Server installer has stopped working on Windows

Can we install SQL Server in Windows 11?

Yes, you can install the SQL Server on Windows 11. However, do keep in mind that, the SQL Server should not be from 2016 or earlier as they are not compatible. To know more, go to microsoft.com.

How do I fix SQL Server unable to install?

If you are unable to install SQL Server on your computer, make sure you are installing the compatible version. In case, you get the issue when installing a compatible version of SQL Server, check out the solutions mentioned in this post.

Original Article