Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

SQL Server issue connecting to named instance

Posted on 2016-11-22
6
Medium Priority
?
107 Views
Last Modified: 2016-12-28
This is an odd one that I've never seen before. I'm hoping someone can shed some light.

I have a SQL Server database with a default instance and a named instance. For the sake of this conversation we'll call the named instance SQL2.

Using the local IP address I can connect to the named instance just fine. See screenshot below.
working - localHowever, using the public IP address the connection fails. See similar screenshot below. (Public IP address is made up)
not working - publicFurther complicating things is that if I use the explicit port number instead of the named instance it works again.
working - publicI've never seen a case of a named instance failing to connect like this. There must be some kind of configuration issue I'm overlooking. Can anyone suggest a solution?
0
Comment
Question by:Russ Suter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 40

Expert Comment

by:lcohan
ID: 41898409
did you tried adding a alias name for the instance? You'll need the SQL Server Configuration Manager. Go to Sql Native Client Configuration, Select Client Protocols, Right Click on TCP/IP and set your default port there.

https://msdn.microsoft.com/en-us/library/ms177440.aspx
<<Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)>>
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41898689
Use Configuration Manager and check what protocols have you enabled for this SQL Server instance.
0
 
LVL 9

Accepted Solution

by:
miron earned 2000 total points
ID: 41899395
Please read the following article: Configure the Windows Firewall to Allow SQL Server Access, URL: https://msdn.microsoft.com/en-us/library/cc646023.aspx

Relevant points:

1_
SQL Server default instance running over TCP TCP port 1433

2_
SQL Server Browser service UDP port 1434 The SQL Server Browser service listens for incoming connections to a named instance and provides the client the TCP port number that corresponds to that named instance. Normally the SQL Server Browser service is started whenever named instances of the Database Engine are used. The SQL Server Browser service does not have to be started if the client is configured to connect to the specific port of the named instance.  

3_
Entire subsection Configure a Windows Firewall for Database Engine Access, URL https://msdn.microsoft.com/en-us/library/ms175043.aspx

Document portion
A_
To open access to SQL Server when using dynamic ports
In the Program dialog box, select This program path. Click Browse, and navigate to the instance of SQL Server that you want to access through the firewall, and then click Open. By default, SQL Server is at C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Binn\Sqlservr.exe. Click Next. ( please note, application Sqlservr.exe location can differ in actual installation )

To summarize, ensure the following ports are opened for successfull connection to SQL Server:

UDP port 1434
TCP port 1433 ( Default instance )
TCP port for application sqlservr.exe ( Named instance dynamic port configuration )

-- cheers
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 20

Author Comment

by:Russ Suter
ID: 41899443
I'm looking into the SQL Server Browser service. The perimeter firewall may be blocking UDP traffic on port 1434. Unfortunately I don't have access to configure that firewall so I've submitted a request. I'll get back to you.
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 41899447
What for do you need the SQL Browser service running? This is only needed if you use Name Pipes protocol. Is that what you want?
0
 
LVL 20

Author Closing Comment

by:Russ Suter
ID: 41899849
Opening Port 1434 to UDP traffic did the trick.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question