Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

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.

share|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
    
Note that with SQL Server Express the instance name has to be included. This is different from the full SQL Server editions where with just the machine name it will then connect to the default database. So localhost\SQLEXPRESS and not just localhost. –  Brian Sep 24 '13 at 2:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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