SQLserver Express connection error

Duggan, Daniel 96 Reputation points
2021-02-09T21:12:14.953+00:00

I my VB2019 app and tried to run it in debug before I started editing it. However, I got this error message when the app opened a form with text boxed to be prepopulated with data from a SQLserver Express database:

The attempt to attach to the database failed with the following information:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - No process is on the other end of the pipe.)

I already have a version of this app that was complied and installed on the same computer months ago and it ran properly but now it also throws the error above.

I have tried stopping and restarting the SQLserver Express service and that didn't work. I also tried to refresh the mdf in VB2019 and threw the same error message.

Do you have a fix for this?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,068 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,626 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
958 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,286 Reputation points
    2021-02-09T22:35:02.653+00:00

    There are many reasons for this and if no code changes or changes to SQL-Server.

    Try changing from Windows Authentication (if that is what is used) to SQL Authentication

    In SSMS (SQL-Server Management Studio)

    1. Right click on the server name and select properties
    2. Select security tab
    3. Enable the SQL Server and Windows Authentication mode
    4. Restart the SQL Server

    Otherwise reverse the above, SQL Authentication to Windows Authentication.

    Another idea, if passwords are used, ensure they are not expired by logging in as admin to SSMS (SQL-Server Management Studio)

    Also see the following which is not resolved but has things to try out.

    0 comments No comments

  2. Duggan, Daniel 96 Reputation points
    2021-02-09T23:17:06.823+00:00

    Those suggestions didn't work. This is a VB2019 app that I am updating. I have an earlier version of this app installed on the same computer. They both ran without errors a week ago. Now they both throw this error. It look to me as though it would have to be an issue with SQLserver Express itself, in order to throw the same error in both debug and the installed app. Do you know what could cause that?


  3. Duane Arnold 3,216 Reputation points
    2021-02-10T05:42:52.327+00:00

    Do you know what could cause that?

    Named Piped interprocess communications is used by MS SQL Server and a client program running on the same local machine.

    https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-use-named-pipes-for-network-interprocess-communication

    Maybe, Named Pipes has been disabled for some reason on MS SQL Server Express.

    https://www.sqlshack.com/sql-server-network-configuration/

    I have tried stopping and restarting the SQLserver Express service and that didn't work. I also tried to refresh the mdf in VB2019 and threw the same error message.

    What do you mean by the above, becuase if the MDF file was 'Attached' to the MS SQL Server engine, then there should be no refreshing involved, if you were actually using MS SQL Server Express with the database and not using LocalDB a MS SQL Server Express limited version of the database engine that works with a standalone MDF file?


  4. Duane Arnold 3,216 Reputation points
    2021-02-10T12:36:20.583+00:00

    One other thing, you can always do a Windows restore point back to when MS SQL Server was working. I think you have an option to only restore programs and not loose data files or configuration files and whatnot.

    0 comments No comments

  5. Erland Sommarskog 103.5K Reputation points MVP
    2021-02-11T21:59:05.4+00:00

    There are no stack dumps or similar in the errorlog that can be related to this problem.

    However, I see this:

    Microsoft SQL Server 2014 - 12.0.2000.8

    You are running the RTM version of SQL 2014. You should download and install the most recent Service Pack which is SP3, and you should also apply the final Cumulative Update which is CU4.

    This may resolve the problem, although I don't know for sure. But it the issue may be related to different TLS versions.