We understand when connecting to SQL server that specifying:

  • < host name>
  • < ip address>
  • < host or ip>,< port number>

That the ADO or ODBC client will typically use tcpip to connect.

However, we observe that when a client asks to connect to:

< server>\< instance name> that it seems the client (ODBC in this case) does NOT use tcpip.

  • What does it use?
  • Can I force this to use tcpip?

And is the behavior (of the 32 bit Windows ODBC driver for SQL Server) in this regard the same as the behavior of the old dblib client?


When specifying a servername\instance name server in the connection strings, it'll attempt to do port resolution through SQL Browser which will be on UDP port 1434. If there is a successful response it should contain the port number or named pipe endpoint and the connection (if TCP/IP or Named Pipes is enabled) should succeed.

This depends on:

  1. What client protocols are enabled
  2. What Server Protocols are enabled
  3. SQL Browser service is running or not
  4. No protocol specified in the connection string
  5. Firewall Rules
  6. Client Connection Library

Can I force this to use tcpip?

Absolutely! In order to force a protocol, add it to the beginning of the server name in the connection string. For example if you wanted to force TCPIP for MyServer\MyInstance which was on port 5400 you could use:

  • Server=TCP:MyServer,5400
  • Server=TCP:MyServer\MyInstance

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.