FreeTDS User Guide

A Guide to Installing, Configuring and Running FreeTDS

Brian Bruns

James K. Lowden

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.


Table of Contents
About this User Guide
1. What is FreeTDS?
Background: The TDS Protocol and related APIs
History of TDS Versions
History of FreeTDS
Current Projects, Language Bindings, and Alternatives
Current Projects
Status
Languages besides C and Java
Alternatives
2. Build FreeTDS
The GNU World
What to build: Packages, Tarballs, and the CVS
How to build: Configure and make
For Experts
For Everyone Else
OS-specific Issues
3. Install FreeTDS
The local environment
Choosing a TDS protocol version
The freetds.conf file
What it does
Where it goes
What it looks like
The locales.conf file
What it does
Where it goes
What it looks like
Setting the environment variables
What they're for
Setting environment variables
Checking your work
Configurations that Work
Confirm the installation
tsql
Unit Tests
4. Advanced Configurations
Big Endian Clients with Buggy SQL Servers
TDS 7.0 for Nonwestern Languages
Domain Logins
Appending Dump Files
TDS Connection Pooling
stunnel HOWTO
5. How to get what works with it working
SQSH
Perl
PHP
db-lib
ct-lib
ODBC
SybSQL
Python
iODBC Driver Manager
New configuration methods
The unixODBC Driver Manager
Troubleshooting unixODBC
6. Troubleshooting
Known Issues
Text Fields
Endianism
Datetime and Money
dbopen Conflicts with dbm
Microsoft's "Integrated Security"
Is the server there?
Logging
Environment Variables that Control Logging
"Page contains no data"
Slow connection or data retrieval
7. Getting Help
Isolate the cause
Mailing list archive
Ask the list
What to include when asking for help
8. Helping
Pick a weak spot and fix it.
Isolate bugs
Send a patch
Correct this User Guide
Document an API
Add to the FAQ
Advocacy
9. Programming
TDS protocol reference
TDS API [future reference]
Examples [future reference]
10. Acknowledgments
Codesmyths
Contributors
A. The interfaces File
Where it came from
Where it goes
What it does
What it looks like
B. About Unicode, UCS-2, and UTF-8
ASCII: What everyone knows
ISO 8859: What everyone would like to forget
Unicode: East meets West
Unicode's Pluses and Minuses
Unicode Transformation Format: UTF-8
Unicode and FreeTDS
C. GNU Free Documentation License
PREAMBLE
APPLICABILITY AND DEFINITIONS
VERBATIM COPYING
COPYING IN QUANTITY
MODIFICATIONS
COMBINING DOCUMENTS
COLLECTIONS OF DOCUMENTS
AGGREGATION WITH INDEPENDENT WORKS
TRANSLATION
TERMINATION
FUTURE REVISIONS OF THIS LICENSE
How to use this License for your documents
List of Tables
3-1. Versions of the TDS Protocol, by Product
3-2. freetds.conf settings
3-3. Combinations of FreeTDS Clients and Servers (April 2001)
4-1. pool.conf settings
5-1. Connection attributes
A-1. Services Line
List of Examples
3-1. A freetds.conf file example
3-2. Failing to connect with tsql
3-3. Connect with tsql using a servername in freetds.conf
3-4. Connect with tsql using a hostname and port number
4-1. Emulate Little Endian freetds.conf setting
4-2. Configuring for GREEK freetds.conf setting
4-3. Configuring for UTF-8 freetds.conf setting
4-4. Turning on domain login support in freetds.conf
4-5. Turning on Dump File Append mode in freetds.conf
4-6. pool.conf
4-7. Unencrypted entry in freetds.conf
4-8. Encrypted entry in freetds.conf
5-1. The SQSH Makefile
5-2. Sample odbc.ini File
5-3. Sample freetds.conf-less odbc.ini file (adapted from previous example)
A-1. An interfaces file example
B-1. "HELLO" in UCS-2 and UTF-8