2

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.

  • Is your browser running and did you change the default name of the pipe? – SqlWorldWide Apr 28 '17 at 11:26
  • @SqlWorldWide - Yes browser is running, and No, it's the default name. – Molenpad Apr 28 '17 at 12:08
  • is udp 1434 open for the browser to use? – Ste Bov Apr 28 '17 at 13:33
  • @SteBov Yes it is. I can connect to the named instance with servername\instance name and can talk to UDP 1434 using PortQry – Molenpad Apr 28 '17 at 13:44
  • Did you google named pipes port number? I did and it's 445. I don't know if it will improve your connectivity issues though. – Nick.McDermaid May 13 '17 at 3:11
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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