Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this guide, we will learn to troubleshoot on issue where Microsoft SQL Server fails to install Database Engine Service in some modern Windows 11 devices.

Info

Click here to jump to solution.

Table of Contents
minLevel1
maxLevel7
typeoutlineflattrue

...

Symptoms

When you are installing Microsoft SQL Server on a Windows 11 device, the installation fails at Database Engine Service.

...

When connecting to the database via SQL Server Management Studio (SSMS), the connection fails with the following error or something similar.

...

.

Warning

Cannot connect to COMPUTER-NAME.

Additional Information:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the Instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: -2)

The system cannot find the file specified

...

The Database Engine service inside the Services is not started and can't be started with the following error.

...

Note

Windows could not start the SQL Server (MSSQLSERVER) service on Local Computer.

Error 1067: The process terminated unexpectedly.

...

Confirming Symptom

To determine if your device suffer from the following issue, you may use run the following command on an elevated command prompt to check if your device will encounter this issue:

Code Block
fsutil fsinfo sectorinfo C:

If the results for PhysicalBytesPerSectorForAtomicity, PhysicalBytesPerSectorForPerformance, or FileSystemEffectivePhysicalBytesPerSectorForAtomicity is any values other than 512 or 4096, you will encounter issue installing Microsoft SQL Server.

Following is an example of a laptop suffering from such issue:

...

On a working device, the following will be the output:

...

Solution

Open an elevated command prompt by searching for cmd in Start Menu, then right click and select Run as Administrator.

Click copy and execute the following command:

Code Block
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t   REG_MULTI_SZ /d "* 4095" /f

The following should be the output:

...

After this, restart the computer and try installing Microsoft SQL again.

Note

If you have previously installed Microsoft SQL Server but encountered issues, please consider removing the failed instances using the following guide:

...

Additional Resources

...