Microsoft SQL Server/Connecting to MS SQL Server from *nix

This tutorial assumes you are using a Debian based distribution of Linux; if not, you might have to modify the instructions appropriately for you distro.

Downloading
To install both freetds and the drivers for iODBC and unixodbc use apt-get, i.e.,

If you plan to use iODBC, you'll want to run

If you're using Perl, after you install FreeTDS you'll want to install the DBD for Sybase:

Glossary

 * TDS : Designed by Sybase, the Tabular Data Stream Protocol (TDS) describes how to communicate with MS-SQL and Sybase databases.

Troubleshooting
Many of the errors here are to assist those with Google searches and the users.

Failing to set SYBASE
The following error is a result of not setting the sybase configuration variable