FreeTDS User Guide: A Guide to Installing, Configuring, and Running FreeTDS
Prev | Chapter 4. Preparing ODBC | Next

# 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

Name | Meaning | Possible Values | Default | In `odbc.ini`
--- | --- | --- | --- | ---
`DSN` | Use 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 entry | none | no
`Servername` | A `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 section | none | yes
`Server` | Hostname of a server. Used in an ODBC-only configuration. | A server name or (ip) address | none | yes
`Port` | The TCP port where the dataserver is listening. | Any TCP port | Depends on the TDS version specified with configure | yes
`UID` | Can 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 username | none | no
`PWD` | Can 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). | Any | empty | no
`TDS_Version` | TDS protocol version to use (e.g., 5.0, 7.0). | Any valid protocol version | Depends on the TDS version specified with configure | yes
`APP` | Application name. Identifies the connecting application to the server. | Free form text, up to 30 characters. | none | yes
`WSID` | Name of the local computer, sent to server. Can be specified only for a DSN-less connection. | Any | Computer name | no
`LANGUAGE` | (Human) language the server should use for error messages. | Any | us_english | yes
`Address` | IP address of the dataserver. Useful if you want to specify a server by address, rather than by name. | Any | none | yes
`Database` | Specify which database you want to access. If database do not exists or you haven't permission to access it, the connection will fail. | Any | none | yes
`TextSize` | Maximum size returned from server for blobs. | Any | DB dependent | yes
`PacketSize` | Size of packets to server. Usually you shouldn't set this parameters. Some users saw some performance gain increasing this value. | Any | DB dependent | yes

Prev | Home | Next
Preparing ODBC | Up | DSN-less configuration