Using CData ODBC Drivers in Linux/Unix Environments



Our ODBC drivers support unixODBC and iODBC, the most popular driver managers for Unix/Linux environments, giving you unprecedented access to your Big Data, NoSQL, and SaaS sources from ODBC-capable tools and applications, no matter what operating system you use. This article will walk you through the installation and configuration of any of our ODBC drivers on Red Hat Linux and Debian-based Linux environments like Ubuntu. The ODBC Driver for Salesforce is used as an example.



Using the CData ODBC Drivers on a Unix/Linux Machine

Below are the minimum supported versions for Red Hat-based and Debian-based systems:

  • Ubuntu: 11
  • Debian: 7
  • RHEL: 6
  • CentOS: 6
  • Fedora: 13

See the "Getting Started" section in the help documentation for the libraries required by the driver.

Installing the Driver Manager

Before installing the driver, you need to be sure that your system has a driver manager. unixODBC is a free and open source ODBC driver manager that is widely supported.

For Debian-based systems like Ubuntu, you can install unixODBC with the APT package manager:

apt-get install unixodbc unixodbc-dev

For systems based on Red Hat Linux, you can install unixODBC with yum or dnf:

yum install unixODBC unixODBC-devel

The unixODBC driver manager reads information about drivers from an odbcinst.ini file and about data sources from an odbc.ini file. You can determine the location of the configuration files on your system by entering the following command into a terminal:

odbcinst -j

The output of the command will display the locations of the configuration files for ODBC data sources and registered ODBC drivers. User data sources can only be accessed by the user account whose home folder the odbc.ini is located in. System data sources can be accessed by all users. Below is an example of the output of this command:

DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/myuser/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

Installing the Driver

iYou can downloading the driver in standard packages formats, the Debian .deb package format or the .rpm file format. Once you have downloaded the file, you can install the driver from the terminal.

The driver installer registers the driver with unixODBC and creates a system DSN, which can be used later in any tools or applications that support ODBC connectivity.

For Debian-based systems like Ubuntu, run the following command as root or with sudo

dpkg -i /path/to/package.deb

For systems that support .rpms, run the following command as root or with sudo

rpm -i /path/to/package.rpm

Create a DSN

Define the required connection properties in sections of an odbc.ini file. The section name is the DSN. Refer to the "Getting Started" section in the help documentation for more information on the connection properties needed to connect to your data source.

You will also need to set the Driver property to the name of the driver as defined in the odbcinst.ini.

[CData Salesforce Source]
Driver = CData ODBC Driver for Salesforce
Description = My Description
MyConnectionProperty1 = My Value
MyConnectionProperty2 = My Value2


Download Free Trials

To download free 30-day trial versions of any ODBC Driver, select an ODBC Driver data source on our driver listing page, and navigate to the download page.