Windows 11 - Unable to start MSSQLSERVER service

Vojtech Moravec 41 Reputation points
2021-09-06T08:29:47.06+00:00

Hi,
I have upgraded my windows 10 Pro to Windows 11, these are the current specs:

Device name DESKTOP-M331UEJ
Processor AMD Ryzen 7 5800X 8-Core Processor 3.80 GHz
Installed RAM 32.0 GB
System type 64-bit operating system, x64-based processor
Edition Windows 11 Pro Insider Preview
Version Dev
Installed on ‎ 2021-‎09-‎05
OS build 22449.1000
Experience Windows Feature Experience Pack 1000.22449.1000.0

After the update, the MSSQL server 2019 can't start.
This is the error from the Event Viewer:

MSSQLSERVER
Error: 1067. The process terminated unexpectedly.

Faulting application name: sqlservr.exe, version: 2019.150.4153.1, time stamp: 0x60f610ce
Faulting module name: ntdll.dll, version: 10.0.22449.1000, time stamp: 0x05321977
Exception code: 0xc0000005
Fault offset: 0x0000000000035f8e
Faulting process id: 0x2ad4
Faulting application start time: 0x01d7a2f27a6bc3c3
Faulting application path: C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Binn\sqlservr.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 1796a874-3c3f-467f-a923-4cfe5b7ae754
Faulting package full name: 
Faulting package-relative application ID: 

When trying to repair, or upgrade the SQL server instance i would get this error:

TITLE: Microsoft SQL Server 2019 Setup
------------------------------

The following error has occurred:

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

The most interesting is the SQL Server error log:

2021-09-06 10:16:37.06 Server      Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64) 
    Jul 19 2021 15:37:34 
    Copyright (C) 2019 Microsoft Corporation
    Developer Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 22449: ) (Hypervisor)

2021-09-06 10:16:37.07 Server      UTC adjustment: 2:00
2021-09-06 10:16:37.07 Server      (c) Microsoft Corporation.
2021-09-06 10:16:37.08 Server      All rights reserved.
2021-09-06 10:16:37.08 Server      Server process ID is 13112.
2021-09-06 10:16:37.08 Server      System Manufacturer: 'ASUS', System Model: 'System Product Name'.
2021-09-06 10:16:37.08 Server      Authentication mode is WINDOWS-ONLY.
2021-09-06 10:16:37.08 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2021-09-06 10:16:37.08 Server      The service account is 'WORKGROUP\DESKTOP-M331UEJ$'. This is an informational message; no user action is required.
2021-09-06 10:16:37.08 Server      Registry startup parameters: 
     -d C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf
     -e C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG
     -l C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2021-09-06 10:16:37.08 Server      Command Line Startup Parameters:
     -s "MSSQLSERVER"
2021-09-06 10:16:37.08 Server      SQL Server detected 1 sockets with 8 cores per socket and 16 logical processors per socket, 16 total logical processors; using 16 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2021-09-06 10:16:37.08 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2021-09-06 10:16:37.08 Server      Detected 32682 MB of RAM. This is an informational message; no user action is required.
2021-09-06 10:16:37.08 Server      Using locked pages in the memory manager.
2021-09-06 10:16:37.08 Server      Page exclusion bitmap is enabled.
2021-09-06 10:16:37.22 Server      Buffer Pool: Allocating 8388608 bytes for 4379256 hashPages.
2021-09-06 10:16:37.24 Server      Default collation: Czech_CI_AS (us_english 1033)
2021-09-06 10:16:37.24 Server      Buffer pool extension is already disabled. No action is necessary.
2021-09-06 10:16:37.26 Server      Query Store settings initialized with enabled = 1, 
2021-09-06 10:16:37.27 Server      The maximum number of dedicated administrator connections for this instance is '1'
2021-09-06 10:16:37.27 Server      This instance of SQL Server last reported using a process ID of 2320 at 9/6/2021 10:16:24 AM (local) 9/6/2021 8:16:24 AM (UTC). This is an informational message only; no user action is required.
2021-09-06 10:16:37.27 Server      Node configuration: node 0: CPU mask: 0x000000000000ffff:0 Active CPU mask: 0x000000000000ffff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2021-09-06 10:16:37.27 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2021-09-06 10:16:37.27 Server      Lock partitioning is enabled.  This is an informational message only. No user action is required.
2021-09-06 10:16:37.27 Server      In-Memory OLTP initialized on standard machine.
2021-09-06 10:16:37.28 Server      [INFO] Created Extended Events session 'hkenginexesession'
2021-09-06 10:16:37.28 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2021-09-06 10:16:37.28 Server      Total Log Writer threads: 2. This is an informational message; no user action is required.
2021-09-06 10:16:37.28 Server      clwb is selected for pmem flush operation.
2021-09-06 10:16:37.28 Server      Software Usage Metrics is disabled.
2021-09-06 10:16:37.28 spid9s      Starting up database 'master'.
2021-09-06 10:16:37.29 spid9s      There have been 256 misaligned log IOs which required falling back to synchronous IO.  The current IO is on file C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf.
2021-09-06 10:16:37.38 Server      CLR version v4.0.30319 loaded.
2021-09-06 10:16:37.62 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

This is my personal development machine with single SSD, of disk size 4096 KB! The the IOs are misaligned, and the only fix for this problem is to run the MSSQL service with the 1800 Trace Flag.
(Enables SQL Server optimization when disks of different sector sizes are used for primary and secondary replica log files, in SQL Server Always On and Log Shipping environments. This trace flag is only required to be enabled on SQL Server instances with transaction log file residing on disk with sector size of 512 bytes. )

Is this a bug on Windows 11 side? Sql server side? And can we expect a fix for this?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,163 questions
{count} votes

Accepted answer
  1. Leon Laude 85,651 Reputation points
    2021-09-06T10:29:52.117+00:00

    Hi @Vojtech Moravec ,

    Please note that SQL Server 2019 is not yet officially supported on Windows 11, because Windows 11 has not been officially released yet.
    This however doesn't necessarily mean that it won't work, but it has not been tested/verified by Microsoft so any issue may occur.

    SQL Server 2019: Hardware and software requirements - Operating system support
    https://learn.microsoft.com/en-us/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-ver15?view=sql-server-ver15#operating-system-support

    ----------

    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,
    Leon

    1 person found this answer helpful.

9 additional answers

Sort by: Most helpful
  1. Pankaj Nikam 11 Reputation points
    2021-10-16T13:57:21.06+00:00

    Hi @Leon Laude , Windows 11 is out and the error still persists. Can you please share when can we expect this to work on Windows 11?

    Thanks.

    2 people found this answer helpful.

  2. Joseph Pilov 6 Reputation points Microsoft Employee
    2021-12-21T14:42:43.903+00:00
    1 person found this answer helpful.

  3. Vojtech Moravec 41 Reputation points
    2021-12-02T07:16:50.29+00:00

    After I uninstalled the SQL server, I find out, that I am unable to install SQL server 2019 on Windows 11. The installation just won't work.
    As I found in other thread, the problem is installing the SQL server on the same drive as Windows. For me, the drive is SSD.

    Installing SQL server on my secondary drive (HDD) fixed the installation and startup problems, currently the service run after windows startup.

    0 comments No comments

  4. Frank Runde 1 Reputation point
    2021-12-14T10:53:55.257+00:00

    I can confirm, that this problem only occurs with Samsung SSD 980. I tested on the same hardware with Samsung 980 Pro, Samsung 970 Evo and WD SN730 with no problems. Only if I set up Windows 11 with SQL Server on a Samsung SSD 980 it comes to this problem. So guys, please open up a ticket at Microsoft and Samsung to get this problem solved.