0

Until today when accessed by remote desktop to my sql server could connect using localhost, but suddenly I cant (without any update or change in my server), now I can connect using localhost\instance but cant using localhost.

This is the error, and also it affects connections to several linked servers in this machine

A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections.

Checkpoints:

  1. Firewall - disabled
  2. Allow remote connections - yes
  3. TCP connection allowed - yes
  4. Server running - yes
  5. User running services - domain administrator

Also in my computer I can access to this server using SSMS and only the IP.

In our development environment the user running sql server services is local administrator and everything go fine, but our network team doesn't change anything in our domain that affect administrator user.

SO: Windows Server 2008 R2 Datacenter SP1

closed as off-topic by Jack Douglas Jul 12 '15 at 12:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Jack Douglas
If this question can be reworded to fit the rules in the help center, please edit the question.

  • now I can connect using localhost\instance but cant using localhost. If sql server is running on a non-default port then you have to specify servername\instance or servername,port. Is you sql browser service running ? – Kin Shah Jul 10 '15 at 15:06
1

If it's a named instance well, then, you should have always been using localhost\instance. This is how it's supposed to work. You shouldn't have been able to connect before and I suspect there is a vital detail missing that would explain that.

Possible explanations (there may be others): the instance was the only one on the machine, and maybe an alias was set up or it happened to be running on port 1433 or the browser was able to redirect to the instance. The alias has since been removed or the service has been restarted and/or the instance is for other reasons (such as a manual config change) now on a different port or the browser service has been disabled.

In any case, the solution is to update your connections to reference the full path to the instance, namely: localhost\instance or as Kin suggests make sure the instance is hard-coded to run on a specific port and then use localhost,<port number>.

-1

Restarting the server solved the problem.

  • 1
    Maybe you could use less (err...) colloquial English, rephrase your answer and then mark it as correct? – Vérace Jul 12 '15 at 12:00

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