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 ex‐
17     ception: 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
56                                    use if available (default when tds version
57                                    greater than 7.0)
58                            required
59                                    allow encrypted connections only
60     host                   Name of the host the server is running on.
61                            Domain:   host name or IP address
62                            Default:  SYBASE
63     initial block size     maximum size of a protocol block
64                            Domain:   multiple of 512
65                            Default:  512
66     instance               name of Microsoft SQL Server instance to connect
67                            to (supersedes port)
68                            Domain:   instance name
69                            Default:  none
70     port                   port number that the server is listening to
71                            Domain:   any valid port
72                            Default:  TDS 5.0, 5000; TDS 7.0 and up, 1433
73     tds version            TDS protocol version to use
74                            Domain:   4.2, 5.0, 7.0, 7.1, 7.2
75                            Default:  --with-tdsver value (5.0 if unspecified)
76     text size              default value of TEXTSIZE, in bytes
77                            Domain:   0 to 4,294,967,295
78                            Default:  4,294,967,295
79     timeout                seconds to wait for response to a query
80                            Domain:   0 to MAX_INT
81                            Default:  none (wait forever)
82
83     Do not define both port and instance.  One implies the other.
84
85
86
87     Boolean property values may be denoted as on/off, true/false, or 1/0.
88
89   DEBUG FLAGS
90     The log's granularity can be controlled with the debug flags property.
91
92           Value     Meaning
93             0x02    severe error
94             0x04    error
95             0x08    warning
96             0x10    network
97             0x20    information level 1
98             0x40    information level 2
99             0x80    function trace and info
100           0x1000    show pid
101           0x2000    show time
102           0x4000    show source level info (source file and line)
103           0x8000    thread id (not implemented).
104

NAMES AND LOCATIONS

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

ENVIRONMENT

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

FILES

148     /etc/freetds.conf, ${HOME}/.freetds.conf
149

SEE ALSO

151     FreeTDS User Guide
152

HISTORY

154FreeTDS 1.3.3                     May 2, 2017                    FreeTDS 1.3.3
Impressum