Connection attributes

The following table defines all possible ODBC connection attributes for the FreeTDS ODBC driver. Which ones you'll need depends on how you set yourself up. They may appear in your connection string, or in odbc.ini, as indicated in the final column.

Table 4-1. Connection attributes

NameMeaningPossible ValuesDefaultIn odbc.ini
DSNUse DSN. FreeTDS will search odbc.ini for entry. It lets you specify a connection like SQLConnect, but using SQLDriverConnect. Do not use Servername and DSN together. Can be specified only in a connection string, not in odbc.ini. A valid DSN entrynoneno
ServernameA freetds.conf servername, not a hostname as known to DNS. If you want to use ODBC-only configuration, use Server instead.A valid freetds.conf server sectionnoneyes
ServerHostname of a server. Used in an ODBC-only configuration.A server name or (ip) addressnoneyes
PortThe TCP port where the dataserver is listening. Any TCP portDepends on the TDS version specified with configureyes
UIDCan be specified only for a DSN-less connection. (For security reasons, do not store username/password in a configuration file). To use domain authentication, specify the domain using the format domain\password.Any valid usernamenoneno
PWDCan be specified only for a DSN-less connection. (For security reasons, do not store username/password in a configuration file). Clear text password (use domain password for domain authentication).Anyemptyno
TDS_VersionTDS protocol version to use (e.g., 5.0, 7.0).Any valid protocol versionDepends on the TDS version specified with configureyes
APPApplication name. Identifies the connecting application to the server. Free form text, up to 30 characters. noneyes
WSIDName of the local computer, sent to server. Can be specified only for a DSN-less connection.AnyComputer nameno
LANGUAGE(Human) language the server should use for error messages.Anyus_englishyes
AddressIP address of the dataserver. Useful if you want to specify a server by address, rather than by name.Anynoneyes
DatabaseSpecify which database you want to access. If database do not exists or you haven't permission to access it, the connection will fail.Anynoneyes
TextSizeMaximum size returned from server for blobs.AnyDB dependentyes
PacketSizeSize of packets to server. Usually you shouldn't set this parameters. Some users saw some performance gain increasing this value.AnyDB dependentyes