At work, we use Microsoft SQL Server and IBM AS400 databases. Here’s how I set our Linux boxes to allow them to connect to the databases through ODBC. There are seperate instructions for the Debian and Ubuntu (9.10 Karmic Koala) and Red Hat Enterprise Linux (RHEL4 and RHEL5) distributions.
ODBC connections require several layers of software to work. The bottom layer consists of the individual ODBC drivers for each database system. Our top layer is the DBI/DBD interface for Perl. In between these layers is the ODBC driver manager, which keeps track of the DSN’s and their corresponding ODBC drivers.
Packages and Software to Install
Ubuntu Version (tested on 9.10 Karmic Koala)
Debian Version (“unstable” distribution)
We use unixODBC as our ODBC driver manager. First, install unixODBC:
NOTE: Perl’s DBD::ODBC module requires the developer’s version of unixODBC, so install that one.
# apt-get install unixodbc-dev