1
votes

I was able to connect to (localdb)\MSSQLLocalDB without any issues. I then installed Microsoft ReportViewer 2015 runtime, and can no longer connect.

The error I get is:

Cannot connect to (localdb)\MSSQLLocalDB.

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: SQL Network Interfaces, error: 50 - Local Database Runtime error occured. Error occured during LocalDB instance startup: SQL Server process failed to start.) (Microsoft SQL Server)

Has anyone come across this before, and know how to fix it? I can't find anything on it :\

The event log has the following;

Windows API call WaitForMultipleObjects returned error code: 575. Windows system error message is: {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application. Reported at line: 3728.

The SQL Server log has the following:

{Date} {Time} Server      Microsoft SQL Server 2014 - 12.0.4100.1 (X64) 
    Apr 20 2015 17:29:27 
    Copyright (c) Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

{Date} {Time} Server      UTC adjustment: 10:30
{Date} {Time} Server      (c) Microsoft Corporation.
{Date} {Time} Server      All rights reserved.
{Date} {Time} Server      Server process ID is 4392.
{Date} {Time} Server      System Manufacturer: {Manufacturer}, System Model: {Model}.
{Date} {Time} Server      Authentication mode is MIXED.
{Date} {Time} Server      Logging SQL Server messages in file 'C:\Users\{user}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\error.log'.
{Date} {Time} Server      The service account is '{domain}\{user}'. This is an informational message; no user action is required.
{Date} {Time} Server      Command Line Startup Parameters:
     -c
     -S "MSSQL12E.LOCALDB"
     -s "LOCALDB#6A0C87E6"
     -d "C:\Users\{user}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\master.mdf"
     -l "C:\Users\{user}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\mastlog.ldf"
     -e "C:\Users\{user}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB\error.log"
{Date} {Time} Server      SQL Server detected 1 sockets with 4 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
{Date} {Time} Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
{Date} {Time} Server      Detected 7113 MB of RAM. This is an informational message; no user action is required.
{Date} {Time} Server      Using conventional memory in the memory manager.
{Date} {Time} Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
{Date} {Time} Server      The maximum number of dedicated administrator connections for this instance is '1'
{Date} {Time} Server      Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
{Date} {Time} 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.
{Date} {Time} Server      Software Usage Metrics is disabled.
{Date} {Time} spid8s      Starting up database 'master'.
{Date} {Time} spid8s      24 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
{Date} {Time} spid8s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
{Date} {Time} Server      CLR version v4.0.30319 loaded.
{Date} {Time} Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
{Date} {Time} spid8s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
{Date} {Time} spid8s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
{Date} {Time} spid8s      SQL Trace ID 1 was started by login "sa".
{Date} {Time} spid8s      Server name is '{ComputerName}\LOCALDB#6A0C87E6'. This is an informational message only. No user action is required.
{Date} {Time} spid14s     Server local connection provider is ready to accept connection on [ \\.\pipe\LOCALDB#6A0C87E6\tsql\query ].
{Date} {Time} spid14s     Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
{Date} {Time} spid8s      Error: 17204, Severity: 16, State: 1.
{Date} {Time} spid8s      FCB::Open failed: Could not open file E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf for file number 0.  OS error: 3(The system cannot find the path specified.).
{Date} {Time} spid8s      Error: 5120, Severity: 16, State: 101.
{Date} {Time} spid8s      Unable to open the physical file "E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
{Date} {Time} spid12s     Starting up database 'mssqlsystemresource'.
{Date} {Time} spid12s     The resource database build version is 12.00.4100. This is an informational message only. No user action is required.
{Date} {Time} spid12s     Starting up database 'model'.
{Date} {Time} spid12s     Error: 17204, Severity: 16, State: 1.
{Date} {Time} spid12s     FCB::Open failed: Could not open file E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\model.mdf for file number 1.  OS error: 3(The system cannot find the path specified.).
{Date} {Time} spid12s     Error: 5120, Severity: 16, State: 101.
{Date} {Time} spid12s     Unable to open the physical file "E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\model.mdf". Operating system error 3: "3(The system cannot find the path specified.)".
{Date} {Time} spid12s     Error: 17207, Severity: 16, State: 1.
{Date} {Time} spid12s     FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
{Date} {Time} spid12s     File activation failure. The physical file name "E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\modellog.ldf" may be incorrect.
{Date} {Time} spid12s     Error: 945, Severity: 14, State: 2.
{Date} {Time} spid12s     Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
{Date} {Time} spid12s     SQL Server shutdown has been initiated
{Date} {Time} spid12s     SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

Please note; I do not, nor have I ever had an E:\ drive :\

1
You don't have an E: drive, ok, but does the rest of that long path sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf make sense, just located at another drive letter? - David Tansey
Nope. The only thing in the entire path that makes any sense is the MSDBData.mdf - theres an mdf file of the same name at "C:\Users\{user}\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB" (which is where the log is located) - Luke

1 Answers

1
votes

I ended up deleting and recreating the instance.
I.E.

Open command prompt
-> cd %localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB
-> sqllocaldb delete mssqllocaldb
-> sqllocaldb create mssqllocaldb
-> sqllocaldb start mssqllocaldb