FreeTDS User Guide: A Guide to Installing, Configuring, and Running FreeTDS
Prev | Chapter 3. Install FreeTDS | Next

# Port override syntax

The port to which to connect can be overridden using a FreeTDS extended syntax.

A port may be appended to the servername in the form ``servername`:`port``. FreeTDS will attempt to connect to specified port. Please note `port` must be a number; a service name is not supported.

If you specify ``servername`\`instance`` as servername during login, FreeTDS will attempt to connect to specified instance. Only Microsoft SQL Server instances are supported. (This server feature was introduced with SQL Server 2000.)

Note that other `freetds.conf` properties still apply.

For the technically curious: each SQL Server instance appears on the network as a server listening at a port. The old way — and it still works — is to designate each instance in `freetds.conf` as a separate server. The new "named instance" notation, if we can call it that, instead uses the server to discover the port. The library sends a UDP packet containing the instance name to the server at a well known port, port 1434. The server responds with a port number. FreeTDS then uses that number to connect in the usual way.

Prev | Home | Next
Environment variables | Up | Confirm the installation