2

I get the following error message when I attempt to connect to my database.

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: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

This is the 3rd time that I removed and reinstalled it. On the first successful login, it is fine. Second time, I make changes to the database and get errors about not being able to find the database. I close the program and upon reopening get this error message.

It is confusing but this is SQL Server Express even though it says SQL Server Management Studio 17 upon opening.

Any thoughts or ideas?

9
  • How do you connect to the database? In your own application? If so: could you share some code? And what does your connection string look like (please don't post sensitive information like username / password if its included in the connection string) Jun 26, 2017 at 19:21
  • Server Type: Database Engine XX327###\SQLEXPRESS Authentication: Windows authentication Username: Dept/Name (This is grayed out) This box pops up when I click on the icon for Microsoft SQL Server Management Studio 17
    – Tim Wilcox
    Jun 26, 2017 at 19:26
  • Do you connect from the PC where you installed SQLExpress or form a remote PC? Jun 26, 2017 at 19:29
  • The PC where I installed it.
    – Tim Wilcox
    Jun 26, 2017 at 19:31
  • Did you already have a look in the Windows Services if the sqlepxress Service is still running on that pc? Another thing you can try is to use .\sqlexpress instead of XX327###\SQLEXPRESS Jun 26, 2017 at 19:34

1 Answer 1

0

Make sure database or instance is not in single-user mode.

To change it on instance-level you have to modify the launch parameters of your instance into SQL Server Configuration Manager.

To change it on database-level you have to modify the SINGLE USER option :
Set database from SINGLE USER mode to MULTI USER

1
  • OK, I will look into this. It may be a few days before I can get back to this.
    – Tim Wilcox
    Jun 28, 2017 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.