ntwdblib.dll : How to configure it to connect over tcpip ? (SQL Server, legacy) We have an old app that uses ntwdblib.dll to connect to sql server.

It works, but it appears to connect over named pipes.

Due to moving the sql server to a data center, we need to change this so it connects over tcpip.

Currently, we connect by connecting to:  &lt; server name>\&lt; instance name>

We tried putting just the server name, and &lt; server name>,1433  and that did not work.

How do we specify/configure for this lib to use tcpip?
Try &lt;server name&gt;, &lt;port that instance is listening on&gt; as explained here.

In most cases, a named instance is not going to be listening on port 1433. In order to connect over TCP/IP, you need to explicitly specify the port number. You can find this in SQL Server Configuration Manager - under SQL Server Network Configuration, Protocols for &lt;Instance Name&gt;, right-click TCP/IP and hit Properties. The port number is near the bottom under IPAll:


  


In my case, I'm using dynamic ports, which means a different port could be assigned next time the service starts. You can force a specific, static port in the box below - hit Apply, then OK, then restart the service. You can try to use 1433 here, which might work if this is the only instance on the machine, but I haven't tried to do this for app compatibility reasons - I've always tried to make changes to the app configuration rather than SQL Server.

Then change your app to use &lt;server name&gt;, &lt;port number&gt;.