1FREETDS.CONF(FreeTDS 5)    FreeTDS Reference Manual    FREETDS.CONF(FreeTDS 5)
2

NAME

4     freetds.conf — configuration file for FreeTDS
5

SYNOPSIS

7     The freetds.conf file describes Sybase and Microsoft database servers to
8     the FreeTDS library.  It comprises sections headed by a servername, fol‐
9     lowed by a list of connection properties denoted as name-value pairs.
10     Defaults are defined via a [global] section.  This file supersedes the
11     interfaces file that Sybase defines for the same purpose, although the
12     latter is still supported.
13

DESCRIPTION

15     A section begins with a servername — the name of the server — in square
16     brackets. The servername is chosen at the client's descretion.  (One
17     exception: with Sybase ASA the servername must match the database name to
18     be used.)
19
20     Sections contain properties, one per line, in the form
21
22           name = value
23
24     where name is the connection property to be described.  Servernames and
25     properties are not case sensitive.  Values are case-preserving i.e.,
26     copied literally.  Comments begin with either a semicolon (‘;’) or pound
27     sign (‘#’) and continue to end of line.  Blank lines are ignored.  White‐
28     space surrounding the ‘=’ is ignored.
29

PROPERTIES

31     client charset         encoding of client data; overrides locale(1) set‐
32                            tings
33                            Domain:   iconv character set names
34                            Default:  ISO-8859-1
35     connect timeout        seconds to wait for response from connect request
36                            Domain:   0 to MAX_INT
37                            Default:  none
38     debug flags            logging granularity
39                            Domain:   32-bit integer
40                            Default:  0x4fff
41     dump file              specifies location of a logfile and turns on log‐
42                            ging
43                            Domain:   valid file name
44                            Default:  none
45     dump file append       log data appended to file instead of re-writing
46                            for each connection
47                            Domain:   yes/no
48                            Default:  no
49     emulate little endian  forces big endian machines to act as little endian
50                            to communicate with Microsoft Servers
51                            Domain:   yes/no
52                            Default:  no
53     encryption
54                            off         disables encryption
55                            request     use if available (default when tds
56                                        version greater than 7.0)
57                            required    allow encrypted connections only
58     host                   Name of the host the server is running on.
59                            Domain:   host name or IP address
60                            Default:  SYBASE
61     initial block size     maximum size of a protocol block
62                            Domain:   multiple of 512
63                            Default:  512
64     instance               name of Microsoft SQL Server instance to connect
65                            to (supersedes port)
66                            Domain:   instance name
67                            Default:  none
68     port                   port number that the server is listening to
69                            Domain:   any valid port
70                            Default:  TDS 5.0, 5000; TDS 7.0 and up, 1433
71     tds version            TDS protocol version to use
72                            Domain:   4.2, 5.0, 7.0, 7.1, 7.2
73                            Default:  --with-tdsver value (5.0 if unspecified)
74     text size              default value of TEXTSIZE, in bytes
75                            Domain:   0 to 4,294,967,295
76                            Default:  4,294,967,295
77     timeout                seconds to wait for response to a query
78                            Domain:   0 to MAX_INT
79                            Default:  none (wait forever)
80
81     Do not define both port and instance.  One implies the other.
82
83
84
85     Boolean property values may be denoted as on/off, true/false, or 1/0.
86
87   DEBUG FLAGS
88     The log's granularity can be controlled with the debug flags property.
89
90           Value     Meaning
91             0x02    severe error
92             0x04    error
93             0x08    warning
94             0x10    network
95             0x20    information level 1
96             0x40    information level 2
97             0x80    function trace and info
98           0x1000    show pid
99           0x2000    show time
100           0x4000    show source level info (source file and line)
101           0x8000    thread id (not implemented).
102

NAMES AND LOCATIONS

104     The file is normally named /etc/freetds.conf or ${HOME}/.freetds.conf.
105     That name can be overridden with the FREETDSCONF environment variable.
106
107     FreeTDS will search conf files for a servername in the following order:
108           1.   a filename set programatically via dbsetifile() that is in
109                .conf format
110           2.   a filename in the environment variable FREETDSCONF that is in
111                .conf format
112           3.   ${HOME}/.freetds.conf if extant
113           4.   /etc/freetds.conf
114
115     The search stops with the first file containing the servername.
116
117     If no conf file is found, FreeTDS searches for an interfaces file in the
118     following order:
119           1.   a filename set programatically via dbsetifile() that is in
120                interfaces format
121           2.   ${HOME}/.interfaces
122           3.   $SYBASE/interfaces (where $SYBASE is an environment variable)
123
124     If the requested servername is not found in any configuration file, the
125     fallback mechanism is:
126           1.   attempt to convert the name to an IP address with
127                inet_addr(3), else
128           2.   attempt to convert the name to an IP address with gethostby‐
129                name(3), else
130           3.   attempt to look up the literal name “SYBASE”
131

ENVIRONMENT

133     FREETDSCONF    overrides name and location of the system-wide conf file
134     TDSDUMP        overrides the name and location of the FreeTDS log file
135     TDSDUMPCONFIG  specifies a name and location of a file that logs the
136                    search of configuration files
137     TDSHOST        overrides the host property
138     TDSPORT        overrides the port property
139     TDSQUERY       synonym for DSQUERY, the default servername
140     TDSVER         overrides the version specified in the freetds.conf
141
142     The environment variables TDSVER, TDSDUMP, TDSPORT, TDSQUERY, and TDSHOST
143     override values set by a .conf or interfaces file.
144

FILES

146     /etc/freetds.conf, ${HOME}/.freetds.conf
147

SEE ALSO

149     FreeTDS User Guide
150

HISTORY

152FreeTDS 1.1.20                    May 2, 2017                   FreeTDS 1.1.20
Impressum