SQL Server Management Studio: network-related or instance-specific error while establishing a connection to SQL server.

Here's a screenshot of the error:

enter image description here

link|improve this question
Has this ever worked? When was the last time? Did anything change on the computer between when it worked and when it stopped working? What troubleshooting steps have you performed? It's considered polite to give as much of this information as possible to the people who are volunteering to help you. – Stephen Jennings Apr 9 '11 at 9:19
Thanks Stephen, – tan Apr 9 '11 at 20:23
Thanks Stephen, Yes it did work on Thursday. I attached two database files and then closed Microsoft SQL Server Management Studio. Later, there was a windows update which was cancelled halfway. When revisiting MS SQL Server Management Studio on Friday, this error showed up. – tan Apr 9 '11 at 20:30
feedback

1 Answer

Your screenshot shows you trying to connect to localhost from SQL Server Management Studio. This means you are implicitly making the following assumptions:

  • A SQL Server is already installed on localhost.

  • The SQL Server instance is currently running (check this in SQL Server Configuration Manager under "SQL Server Services").

  • The SQL Server instance is the default instance, and so is accessible without specifying an instance name such as localhost\SQLEXPRESS (open a command prompt and type sqlcmd -L to list your instances).

  • The SQL Server instance accepts connections via named pipes or TCP port 1433 (check this in SQL Server Configuration Manager under "SQL Server Network Configuration").

Which one of these assumptions is not true? Fix that and you'll probably be able to connect.

link|improve this answer
Yes, I'm trying to connect to server on localhost. It worked before, but now I'm seeing nothing under SQL Server Services. sqlcmd -L returns an empty list of servers. – tan Apr 9 '11 at 20:35
If the SQL Server service itself (as opposed to the browser service and a few others) is not listed under SQL Server Services, then somehow your instance got uninstalled. You'll need to reinstall it. – Stephen Jennings Apr 11 '11 at 15:26
feedback

Your Answer

 
or
required, but never shown

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