How to connect to a named instance of SQL Server?


June 21, 2013

Introduction

In this article we will take a look at some of the reason because of which you won’t be able to connect to a named instance of SQL Server.

Problem

I am unable to connect to a named instance of SQL Server by specifying SERVERNAME\INSTANCENAME as the server name in SQL Server Management Studio. I am not sure what went wrong. In this article I will explain in detail the problem areas and the steps to resolve this issue.

Below mentioned is the error message which you would receive when you are unable to connect to the named instance of SQL Server.

Error Message

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) (Microsoft SQL Server, Error: -1)

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) (Microsoft SQL Server, Error: -1)

Newsletter Signup

Solution

Below mentioned are the some of the reasons why you won’t be able to connect to a named instance of SQL Server:-

  • SQL Server Browser Service is currently stopped or its disabled on the server which hosts the named instance of SQL Server
  • Windows or Network Administrator would have blocked UDP traffic to port 1434
  • Windows Firewall is not allowing the incoming requests to UDP Port 1434

Important Note:- If SQL Server Browser Service is up and running then you would be able to connect to a named instance of SQL Server without specifying the port number. The SQL Server Browser Service runs on UDP Port 1434 and it should be added to the exception list if you are using any kind of firewall.

To resolve this issue you would need to run the above mentioned checks and take action accordingly.

How to connect to a named instance of SQL Server using command prompt

You can start a named instance of SQL Server from the command prompt by entering the below command in command prompt.

sqlservr.exe -c -s {instancename}


Continue Free Learning...

  • Please leave below your valuable feedback for this article.
  • Feel Free to refer this article to your friends and colleagues using the below “Share this Article” option.
  • Do subscriber to our News Letter to continue your free learning.
  • Don’t forget to Like Us on Facebook and do follow us on Twitter for latest updates.

Share this Article


Geeks who read this article also read…



Follow @MyTechMantra on Twitter
We're on Facebook

"Receive newsletters and special offers about SQL Server, BizTalk and SharePoint from MyTechMantra. We respect your privacy and you can unsubscribe at any time."