Solved

SQL Server issue connecting to named instance

Posted on 2016-11-22
6
79 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 49

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 500 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
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 49

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

726 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