FreeTDS User Guide: A Guide to Installing, Configuring, and Running FreeTDS | ||
---|---|---|
Prev | Chapter 3. Install FreeTDS | Next |
FreeTDS converts the servername to an IP address by following the steps below, stopping when it succeeds.
Name lookup sequence [1]
Find servername in freetds.conf. If a section with that name exists, use the hostname, port, and TDS version specified therein.
Attempt to convert servername to an IP address with inet_addr(3)
.
Request name-lookup from the operating system via gethostbyname(3)
or similar.
As you can see, if most of your servers use the same TDS version and answer to the default port, then you don't need to list them all in freetds.conf. You can simply compile in the right defaults — or set the TDSPORT
and TDSVER
environment variables — and rely on DNS for name resolution.
[1] | This description applies to DB-Library and CT-Library. ODBC lookup is different. |