Search Shortcut cmd + k | ctrl + k
Search cmd+k ctrl+k
1.0 (stable)
ODBC API on Linux

Driver Manager

A driver manager is required to manage communication between applications and the ODBC driver. We tested and support unixODBC that is a complete ODBC driver manager for Linux. Users can install it from the command line:

On Debian-based distributions (Ubuntu, Mint, etc.), run:

sudo apt-get install unixodbc odbcinst

On Fedora-based distributions (Amazon Linux, RHEL, CentOS, etc.), run:

sudo yum install unixODBC

Setting Up the Driver

  1. Download the ODBC Linux Asset corresponding to your architecture:

  2. The package contains the following files:

    • the DuckDB driver.
    • a setup script to aid the configuration on Linux.

    To extract them, run:

    mkdir duckdb_odbc && unzip -d duckdb_odbc
  3. The script performs the configuration of the DuckDB ODBC Driver. It is based on the unixODBC package that provides some commands to handle the ODBC setup and test like odbcinst and isql.

    Run the following commands with either option -u or -s to configure DuckDB ODBC.

    The -u option based on the user home directory to setup the ODBC init files.

    ./ -u

    The -s option changes the system level files that will be visible for all users, because of that it requires root privileges.

    sudo ./ -s

    The option --help shows the usage of prints the help.

    ./ --help
    Usage: ./ <level> [options]
    Example: ./ -u -db ~/database_path -D ~/driver_path/
    -s: System-level, using 'sudo' to configure DuckDB ODBC at the system-level, changing the files: /etc/odbc[inst].ini
    -u: User-level, configuring the DuckDB ODBC at the user-level, changing the files: ~/.odbc[inst].ini.
    -db database_path>: the DuckDB database file path, the default is ':memory:' if not provided.
    -D driver_path: the driver file path (i.e., the path for, the default is using the base script directory
  4. The ODBC setup on Linux is based on the .odbc.ini and .odbcinst.ini files.

    These files can be placed to the user home directory /home/⟨username⟩ or in the system /etc directory. The Driver Manager prioritizes the user configuration files over the system files.

    For the details of the configuration parameters, see the ODBC configuration page.