HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Which ports need to be opened in order to use Named Pipes

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
pipesorderportsneednamedwhichuseopened

Problem

I have a SQL Server with both TCP\IP and Named Pipes protocols enabled and configured.

From the server itself I can connect to the database using either TCP or Named Pipes, by specifying the connection as np:servername\instance

However from another server I can only connect using TCP\IP using servername\instancename. Adding the np: prefix just causes a connection timeout failure.

Do I need to open any specific ports in order to use Named Pipes? This is a named instance running on a dynamic port. The dynamic port is opened in the firewall.

The reason I'm looking into this is because I'm experiencing intermittent issues with an ODBC connection - timeouts, connection dropouts etc. From what I've read these issues have in the past been resolved by enabling Named Pipes - which I've done, but then by default my connections are using TCP, and by force, I can't get it to connect from this server.

Solution

We had the same issue with legacy applications built around 1998-2007 when we ported SQL Server to a VLAN--for security purposes. Depending on which server we connected to we'd get spurious results--one would work and the other would not...because of a tighter VLAN configuration.

Our solution was to "bag" named pipes and to force TCP--as shown below. The SQL server port is denoted by XXXXX. This forced our legacy apps to use TCP no matter what. So far, it's fixed all our issues.

tcp:servername\instance,XXXXX

Code Snippets

tcp:servername\instance,XXXXX

Context

StackExchange Database Administrators Q#172251, answer score: 3

Revisions (0)

No revisions yet.