Error 26 on SQL Server Express on local (non-networked) machine

-1

An SQL server exception error 26 has occurred in a program that uses a local instance of SQL Server Express, on a machine that is stand-alone and not a part of any network. Anonymized screenshot is below. It's a legacy program that's been around for a long time and this is the first time (to my knowledge) that this exception has occurred.

Everything I've seen online about this error points to an attempt to access a remote machine, which of course is not the case here.

The connection string is Data Source=(local)\\SQLEXPRESS;Integrated Security=True;MultipleActiveResultSets=True;Initial Catalog=AppDb5_0; This is set when the program starts and is never changed. To get to the point in the program where the exception occurred, the database would have been accessed many times, so it can't be a problem with the connection string.

EDIT: I do see this related question: SQL Server: cannot connect from local website (SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified). However, in that case it's related to the connection string, a problem that would have shown up almost immediately in my program.

What might have happened to cause this exception?

enter image description here

EDIT. Here's a zip of all the log files: https://www.dropbox.com/s/jyi8atc92e81hpv/SqlServerErrorLogs.zip?dl=0

EDIT

Here's one of the log files from the affected computer.

2018-08-22 12:01:18.22 Server Microsoft SQL Server 2016 (SP1-GDR) (KB4293801) - 13.0.4223.10 (X64)

Jul 26 2018 18:39:45

Copyright (c) Microsoft Corporation

Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 17134: )

2018-08-22 12:01:18.22 Server UTC adjustment: 10:00

2018-08-22 12:01:18.22 Server (c) Microsoft Corporation.

2018-08-22 12:01:18.22 Server All rights reserved.

2018-08-22 12:01:18.22 Server Server process ID is 3888.

2018-08-22 12:01:18.22 Server System Manufacturer: 'MSI', System Model: 'MS-7851'.

2018-08-22 12:01:18.22 Server Authentication mode is WINDOWS-ONLY.

2018-08-22 12:01:18.22 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG'.

2018-08-22 12:01:18.22 Server The service account is 'NT Service\MSSQL$SQLEXPRESS'. This is an informational message; no user action is required.

2018-08-22 12:01:18.22 Server Registry startup parameters:

-d C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\master.mdf

-e C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\Log\ERRORLOG

-l C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS\MSSQL\DATA\mastlog.ldf

2018-08-22 12:01:18.22 Server Command Line Startup Parameters:

-s "SQLEXPRESS"

2018-08-22 12:01:21.30 Server SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical processors based on SQL Server licensing. This is an informational message; no user action is required.

2018-08-22 12:01:21.30 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

2018-08-22 12:01:21.30 Server Detected 3972 MB of RAM. This is an informational message; no user action is required.

2018-08-22 12:01:21.30 Server Using conventional memory in the memory manager.

2018-08-22 12:01:21.93 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)

2018-08-22 12:01:23.00 Server Buffer pool extension is already disabled. No action is necessary.

2018-08-22 12:01:24.58 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.

2018-08-22 12:01:24.58 Server Implied authentication manager initialization failed. Implied authentication will be disabled.

2018-08-22 12:01:25.37 Server The maximum number of dedicated administrator connections for this instance is '1'

2018-08-22 12:01:25.38 Server This instance of SQL Server last reported using a process ID of 3900 at 8/22/2018 11:59:45 AM (local) 8/22/2018 1:59:45 AM (UTC). This is an informational message only; no user action is required.

2018-08-22 12:01:25.41 Server Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

2018-08-22 12:01:25.44 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.

2018-08-22 12:01:25.47 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.

2018-08-22 12:01:25.58 Server CLR version v4.0.30319 loaded.

2018-08-22 12:01:26.02 Server Query Store settings initialized with enabled = 1,

2018-08-22 12:01:27.03 spid4s Starting up database 'master'.

2018-08-22 12:01:27.07 Server Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319.

2018-08-22 12:01:27.68 spid4s SQL Server Audit is starting the audits. This is an informational message. No user action is required.

2018-08-22 12:01:27.69 spid4s SQL Server Audit has started the audits. This is an informational message. No user action is required.

2018-08-22 12:01:27.83 spid4s SQL Trace ID 1 was started by login "sa".

2018-08-22 12:01:27.84 spid4s Server name is 'Lab-PC\SQLEXPRESS'. This is an informational message only. No user action is required.

2018-08-22 12:01:27.94 spid4s Starting up database 'msdb'.

2018-08-22 12:01:27.94 spid7s Starting up database 'mssqlsystemresource'.

2018-08-22 12:01:28.02 spid7s The resource database build version is 13.00.4223. This is an informational message only. No user action is required.

2018-08-22 12:01:28.05 spid10s A self-generated certificate was successfully loaded for encryption.

2018-08-22 12:01:28.05 spid10s Server local connection provider is ready to accept connection on [ \.\pipe\SQLLocal\SQLEXPRESS ].

2018-08-22 12:01:28.06 spid10s Server local connection provider is ready to accept connection on [ \.\pipe\MSSQL$SQLEXPRESS\sql\query ].

2018-08-22 12:01:28.06 spid10s 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.

2018-08-22 12:01:28.07 spid10s SQL Server is now ready for client connections. This is an informational message; no user action is required.

2018-08-22 12:01:28.07 Server SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.

2018-08-22 12:01:28.08 Server The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/Lab-PC:SQLEXPRESS ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.

2018-08-22 12:01:28.17 spid7s Starting up database 'model'.

2018-08-22 12:01:28.36 spid7s Polybase feature disabled.

2018-08-22 12:01:28.37 spid7s Clearing tempdb database.

2018-08-22 12:01:28.66 spid7s Starting up database 'tempdb'.

2018-08-22 12:01:28.98 spid13s The Service Broker endpoint is in disabled or stopped state.

2018-08-22 12:01:28.98 spid13s The Database Mirroring endpoint is in disabled or stopped state.

2018-08-22 12:01:29.06 spid13s Service Broker manager has started.

2018-08-22 12:01:29.11 spid4s Recovery is complete. This is an informational message only. No user action is required.

2018-08-22 12:01:32.06 Server Software Usage Metrics is disabled.

2018-08-22 12:36:42.09 spid51 Starting up database 'AppDb5_0'.

2018-08-22 14:38:05.09 Server SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.

2018-08-22 14:38:06.48 spid13s Service Broker manager has shut down.

2018-08-22 14:38:06.48 spid13s Error: 17054, Severity: 16, State: 1.

2018-08-22 14:38:06.48 spid13s The current event was not reported to the Windows Events log. Operating system error = (null). You may need to clear the Windows Events log if it is full.

2018-08-22 14:38:06.50 spid4s .NET Framework runtime has been stopped.

2018-08-22 14:38:06.57 spid4s SQL Server shutdown has been initiated

2018-08-22 14:38:06.57 spid4s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

c#
.net
sql-server
asked on Stack Overflow Aug 27, 2018 by blearyeye • edited Sep 6, 2018 by blearyeye

1 Answer

1

What might have happened to cause [an intermittent connection faillure to a local instance]?

An intermittent connection failure to a local instance like this strongly suggests that the instance wasn't running when you tried to connect. So check the SQL Logs. They'll be in a folder like:

C:\Program Files\Microsoft SQL Server\MSSQLxx.SQLEXPRESS\MSSQL\Log

And will show all startup and shutdown events, in addition to failed logins.

answered on Stack Overflow Aug 27, 2018 by David Browne - Microsoft • edited Aug 27, 2018 by David Browne - Microsoft

User contributions licensed under CC BY-SA 3.0