Getting an error "Could not open a connection to SQL Server" error 40

  • I'm trying to connect to my local SQL Server instance. It has my databases in it (right now I only want to get to one of the databases.) I've accessed this database many times before. I've accessed it with SSMS after upgrading to SQL Server 2016 Developer Edition, at least a half dozen times. Now I'm getting the following error:

    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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    I really don't know what's wrong, nor why I can't access it at all, but could before. I could use some help, please.

    Rod

  • take a look at this link, hope this will help you: http://www.sqlserverlogexplorer.com/fix-error-message-40/ [/url]

  • You can check that the SQL Server service is running in SQL Server Configuration Manager.

  • Thank you, johnwalker10 and courtneywarmback07, your suggestions were correct. The SQL Server service in SQL Server Configuration Manager was stopped. I right-mouse button clicked on it and started it up again. Just got into SSMS and can now connect to my local database fine. 😀

    What I'd like to know is how did it get this way? This is a desktop computer which I do regularly turn off to open it up and blow out the dust. (I live in New Mexico - lots of dust.) So could powering it down and back up again cause the SQL Server service to not come up?

    I see that the SQL Server Browser isn't started, either. I suppose that's OK, as its not likely that other machines on my home network are going to try to find it.

    But there's something there called SQL Server Launchpad. Its not started. What is it and should I try starting it?

    Rod

  • What I'd like to know is how did it get this way? This is a desktop computer which I do regularly turn off to open it up and blow out the dust. (I live in New Mexico - lots of dust.) So could powering it down and back up again cause the SQL Server service to not come up?

    Is the Start Mode in configuration manager set to Automatic? If it is set to manual, it will not automatically start up when you reboot the machine.

    But there's something there called SQL Server Launchpad. Its not started. What is it and should I try starting it?

    See the following link:

    https://msdn.microsoft.com/en-us/library/mt604845.aspx

    I hope this helps.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply