Due to a change on how Windows 11 presents the disk sector size, you can have issues with SQL or SQL Express after your upgrade or even on brand new installations.
SQL might just fail to start after an upgrade, with the Event Viewer Application Log Error 1000 similar to the below one:
1 2 3 4 5 6 7 8 9 10 11 | Faulting application name: sqlservr.exe, version: 2019.150.2080.9, time stamp: 0x5fa6009b Faulting module name: sqllang.dll, version: 2019.150.2080.9, time stamp: 0x5fa60189 Exception code: 0xc0000005 Fault offset: 0x0000000000361bf5 Faulting process id: 0x670c Faulting application start time: 0x01d846287c712ec8 Faulting application path: C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS_2019\MSSQL\Binn\sqlservr.exe Faulting module path: C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS_2019\MSSQL\Binn\sqllang.dll Report Id: 10227658-21ca-4bd0-9121-9bf328003574 Faulting package full name: Faulting package-relative application ID: |
This is especially true for Samsung SSD 980 – be aware – the SSD 980 Pro does not have this issue, just the SSD 980. There are other OEM versions of it that have the same issue and actually a bunch of other disks.
The root cause is that the devices report the true sector size, what causes SQL to fail. This is still true with SQL Express 2019 – earlier versions as well.
As described in this Microsoft article, you can add a registry key and reboot to make Windows 11 behave like Windows 10 and earlier Windows versions.
Of course, alternative you can either install SQL on another disk drive or replace the drive with one that does not have these compatibility issues.
It remains unclear if there will be updates to this in the future from either Microsoft of the disk vendors like Samsung in the future. For now, this simple registry adjustment fixes the issue.
1 | New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes" -PropertyType MultiString -Force -Value "* 4095" |
Reboot after the registry adjustment for the change to take effect.