1FREETDS.CONF(FreeTDS 5) FreeTDS Reference Manual FREETDS.CONF(FreeTDS 5)
2
4 freetds.conf — configuration file for FreeTDS
5
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
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
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 (default)
55 request use if available
56 required allow encrypted connections only
57 host Name of the host the server is running on.
58 Domain: host name or IP address
59 Default: SYBASE
60 initial block size maximum size of a protocol block
61 Domain: multiple of 512
62 Default: 512
63 instance name of Microsoft SQL Server instance to connect
64 to (supersedes port)
65 Domain: instance name
66 Default: none
67 port port number that the server is listening to
68 Domain: any valid port
69 Default: TDS 5.0, 5000; TDS 7.0 and up, 1433
70 tds version TDS protocol version to use
71 Domain: 4.2, 5.0, 7.0, 7.1, 7.2
72 Default: --with-tdsver value (5.0 if unspecified)
73 text size default value of TEXTSIZE, in bytes
74 Domain: 0 to 4,294,967,295
75 Default: 4,294,967,295
76 timeout seconds to wait for response to a query
77 Domain: 0 to MAX_INT
78 Default: none (wait forever)
79
80 Do not define both port and instance. One implies the other.
81
82
83
84 Boolean property values may be denoted as on/off, true/false, or 1/0.
85
86 DEBUG FLAGS
87 The log's granularity can be controlled with the debug flags property.
88
89 Value Meaning
90 0x02 severe error
91 0x04 error
92 0x08 warning
93 0x10 network
94 0x20 information level 1
95 0x40 information level 2
96 0x80 function trace and info
97 0x1000 show pid
98 0x2000 show time
99 0x4000 show source level info (source file and line)
100 0x8000 thread id (not implemented).
101
103 The file is normally named /etc/freetds.conf or ${HOME}/.freetds.conf.
104 That name can be overridden with the FREETDSCONF environment variable.
105
106 FreeTDS will search conf files for a servername in the following order:
107 1. a filename set programatically via dbsetifile() that is in
108 .conf format
109 2. a filename in the environment variable FREETDSCONF that is in
110 .conf format
111 3. ${HOME}/.freetds.conf if extant
112 4. /etc/freetds.conf
113
114 The search stops with the first file containing the servername.
115
116 If no conf file is found, FreeTDS searches for an interfaces file in the
117 following order:
118 1. a filename set programatically via dbsetifile() that is in
119 interfaces format
120 2. ${HOME}/.interfaces
121 3. $SYBASE/interfaces (where $SYBASE is an environment variable)
122
123 If the requested servername is not found in any configuration file, the
124 fallback mechanism is:
125 1. attempt to convert the name to an IP address with
126 inet_addr(3), else
127 2. attempt to convert the name to an IP address with gethostby‐
128 name(3), else
129 3. attempt to look up the literal name “SYBASE”
130
132 FREETDSCONF overrides name and location of the system-wide conf file
133 TDSDUMP overrides the name and location of the FreeTDS log file
134 TDSDUMPCONFIG specifies a name and location of a file that logs the
135 search of configuration files
136 TDSHOST overrides the host property
137 TDSPORT overrides the port property
138 TDSQUERY synonym for DSQUERY, the default servername
139 TDSVER overrides the version specified in the freetds.conf
140
141 The environment variables TDSVER, TDSDUMP, TDSPORT, TDSQUERY, and TDSHOST
142 override values set by a .conf or interfaces file.
143
145 /etc/freetds.conf, ${HOME}/.freetds.conf
146
148 FreeTDS User Guide
149
151FreeTDS 1.00.38 December 23, 2007 FreeTDS 1.00.38