0

I'm not understanding the problem as my instance name is the local machine name "Asten-PC". My datasource within the connection string is the same name. enter image description here

When I go to force update the database using the package manager I also encounter the problem

Blockquote "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)"

This problem stops me continue with my code.

bummi
  • 27,123
  • 14
  • 62
  • 101
Asten
  • 1
  • 1
  • 3
  • The error is actually self explanatory, try to see if this helps:http://stackoverflow.com/questions/18060667/cannot-connect-to-server-a-network-related-or-instance-specific-error – EugenSunic Jan 09 '15 at 22:52
  • I have looked through the answers and none really apply to me. Currently new within the SQL area so my understanding of it is limited. – Asten Jan 09 '15 at 23:24

2 Answers2

0

The server is down or you are do not have it setup correctly. Those are the most common reasons. I am assuming SQL Server is up, so I will go from there. If not, you can start it.

I have not encountered this personally, but you can generally find the issue by opening the SQL Server Configuration Manager and going to SQl Server Network Configuration. You will then have to enable more than simply Shared Memory (the default). I would start with named pipes, as this is tooling (package manager). TCP/IP is less common here, but you can enable it if named pipes does not work for you.

For remote connections, you also have to turn on SQL Browser, but that is not an issue here, as you are local.

I looked at @esner_togo's suggestion and the thread probably won't help you itself, but there is a link at the bottom that might, if my suggestion does not solve the problem.

Gregory A Beamer
  • 16,870
  • 3
  • 25
  • 32
0

Installing SQL Express 2012 seemed to have fixed it for me. It seems using .\SQLEXPRESS is allowed when the 2012 version is installed.

Asten
  • 1
  • 1
  • 3