Unable to start MSSQLLocalDB due to error

37 Views Asked by At

We are trying to get a TAPI connector app working which relies on LocalDB.

This TAPI connector app works fine on many PCs but 2 specific machines are having issues running it.

I have narrowed down the issue to MSSQLLocalDB not being able to start. When I try to start this via PowerShell command "sqllocaldb start MSSQLLocalDB", I get this error message in PowerShell:

Start of LocalDB instance "MSSQLLocalDB" failed because of the following error:
Error occurred during LocalDB instance startup: SQL Server process failed to start.

Upon inspection of the error log, I can see this:

2024-02-13 13:14:20.98 Server      Microsoft SQL Server 2014 (SP3) (KB4022619) - 12.0.6024.0 (X64) 
    Sep  7 2018 01:37:51 
    Copyright (c) Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.3 <X64> (Build 22631: ) (Hypervisor)

2024-02-13 13:14:20.98 Server      UTC adjustment: 0:00
2024-02-13 13:14:20.98 Server      (c) Microsoft Corporation.
2024-02-13 13:14:20.98 Server      All rights reserved.
2024-02-13 13:14:20.98 Server      Server process ID is 16544.
2024-02-13 13:14:20.98 Server      System Manufacturer: 'HP', System Model: 'HP 250 15.6 inch G9 Notebook PC'.
2024-02-13 13:14:20.98 Server      Authentication mode is MIXED.
2024-02-13 13:14:20.98 Server      Logging SQL Server messages in file 'C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSqlLocalDB\error.log'.
2024-02-13 13:14:20.98 Server      The service account is 'WORKGROUP\XXXX$'. This is an informational message; no user action is required.
2024-02-13 13:14:20.98 Server      Command Line Startup Parameters:
     -c
     -S "MSSQL12E.LOCALDB"
     -s "LOCALDB#4EA9FF5A"
     -d "C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSqlLocalDB\master.mdf"
     -l "C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSqlLocalDB\mastlog.ldf"
     -e "C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSqlLocalDB\error.log"
2024-02-13 13:14:21.17 Server      SQL Server detected 1 sockets with 6 cores per socket and 12 logical processors per socket, 12 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2024-02-13 13:14:21.17 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2024-02-13 13:14:21.17 Server      Detected 16057 MB of RAM. This is an informational message; no user action is required.
2024-02-13 13:14:21.17 Server      Using conventional memory in the memory manager.
2024-02-13 13:14:21.31 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2024-02-13 13:14:21.35 Server      The maximum number of dedicated administrator connections for this instance is '1'
2024-02-13 13:14:21.35 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2024-02-13 13:14:21.36 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.
2024-02-13 13:14:21.36 Server      Database Instant File Initialization: disabled. 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.
2024-02-13 13:14:21.38 Server      Software Usage Metrics is disabled.
2024-02-13 13:14:21.39 spid8s      Starting up database 'master'.
2024-02-13 13:14:21.40 spid8s      There have been 256 misaligned log IOs which required falling back to synchronous IO.  The current IO is on file C:\Windows\SysWOW64\config\systemprofile\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSqlLocalDB\master.mdf.
2024-02-13 13:14:21.40 spid8s      02/13/24 13:14:21 Stack Overflow Dump not possible - Exception c00000fd EXCEPTION_STACK_OVERFLOW at 0x00007FFC40A4A0B2
2024-02-13 13:14:21.40 spid8s      SqlDumpExceptionHandler: Address=0x00007FFC40A4A0B2 Exception Code = c00000fd
2024-02-13 13:14:21.40 spid8s      Rax=00000000000010f8 Rbx=0000000000004000 Rcx=000000006b3c0d10 Rdx=0000000064441000
2024-02-13 13:14:21.40 spid8s      Rsi=0000000000000000 Rdi=0000000064441000 Rip=0000000040a4a0b2 Rsp=0000000023062b90
2024-02-13 13:14:21.40 spid8s      Rbp=0000000023061bb0 EFlags=0000000000010206
2024-02-13 13:14:21.40 spid8s      cs=0000000000000033 ss=000000000000002b ds=000000000000002b
es=000000000000002b fs=0000000000000053 gs=000000000000002b
2024-02-13 13:14:21.40 spid8s      
2024-02-13 13:14:21.40 spid8s      TotalPhysicalMemory = 16837500928, AvailablePhysicalMemory = 7047102464
2024-02-13 13:14:21.40 spid8s      AvailableVirtualMemory = 140715507601408, AvailablePagingFile = 17847099392
2024-02-13 13:14:21.40 spid8s      Stack Signature for the dump is 0x0000000000000000
2024-02-13 13:14:21.49 Server      CLR version v4.0.30319 loaded.
2024-02-13 13:14:21.57 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
2024-02-13 13:14:22.40 spid8s      External dump process return code 0x20000001.
External dump process returned no errors.
2024-02-13 13:14:22.41 spid8s      Unable to create stack dump file due to stack shortage (ex_terminator - Last chance exception handling)
2024-02-13 13:14:22.41 spid8s      Stack Signature for the dump is 0x0000000000000000

This seems to indicate that there is something wrong with the memory available. I made the virtual memory file huge to see if that would help but no joy and I cant believe a laptop with 16GB of RAM is the cause when this is working fine on laptops with 4GB of RAM!

Research online points me towards editing the SQL server configuration but this database is an automatically created local DB so I cant find anyway of doing this.

Ive also updated .Net & LocalDB to the latest but nothing changes the issue.

Following commands have also been attempted with no luck:

sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB

Any idea's of what to try next?

0

There are 0 best solutions below