Skip to main content
Skip table of contents

Installing Data Virtuality ODBC (Linux)

To use the Data Virtuality ODBC Driver on Linux, you need to install and configure the driver and a driver manager. The Data Virtuality ODBC Driver currently supports only unixODBC as driver manager.

Installing unixODBC

unixODBC provides the odbcinst and isql command line utilities needed to install, configure, and test the driver. To check if unixODBC is installed, you can execute the following command:

BASH
$ which isql

If unixODBC is not installed, the suggested way of installing unixODBC is to use the Linux operating system default package repositories. In the most popular Linux distributions unixODBC is included in the package repository by default. If it is not available, it can be obtained at the unixODBC homepage or using the following command (as sudo):

Debian / Ubuntu

BASH
$ apt-get install unixodbc

RedHat / CentOS

BASH
$ yum install unixODBC

Installing Data Virtuality ODBC Driver

  1. Download the package from the Data Virtuality web interface.
  2. Install the driver using one of the distribution packages:
  • RPM: separate packages for RedHat, CentOS
  • DEB: one package for Debian and Ubuntu

As sudo, execute the following commands:

Debian / Ubuntu

BASH
$ dpkg -i dvodbc_<version>_<architecture>.deb

Some dependecies should be fulfilled on RedHat and CentOS before installing the RPM driver. Yum will refuse to install the driver, as it is not signed, but will nevertheless show the missing dependencies:

RedHat / CentOS

BASH
$ yum install dv-odbc-<version>-<architecture>.rpm

For example, on CentOS 5.8, it will detect a dependency on libtool-ltdl and unixODBC64-libs. To install the driver, execute the following commands as sudo:

RedHat / CentOS

BASH
$ yum install libtool-ltdl unixODBC64-libs
$ rpm -i dv-odbc-<version>-<architecture>.rpm

Configuring unixODBC and Data Virtuality ODBC Driver

You can configure ODBC by editing the odbcinst.ini and odbc.ini files. To determine the configuration file location, use this command:

BASH
$ odbcinst -j

Configuring the Driver via odbcinst.ini

The configuration in odbcinst.ini lists the installed and configures ODBC database drivers.

odbcinst.ini

BASH
[Data Virtuality Unicode(x64)]
Description = Data Virtuality ODBC Driver (Unicode 9.2)
# Driver - the actual location of the file dvodbcw.so might differ on different Linux distributions
Driver = /usr/lib/dvodbcw.so
Debug = 0
CommLog = 1
UsageCount = 1 
FileUsage = 1
# This entry alters the default thread serialization level. Adaption is mandatory for versions prior unixODBC 2.3.0.
Threading = 0

(info) The actual location of the file dvodbcw.so might differ on different Linux distributions. To locate the file, you can use the find command:

CODE
$ find / -iname 'dvodbcw.so' 2>/dev/null

(info) The threading level needs to be adapted for versions prior to unixODBC 2.3.0. That applies especially for CentOS versions 5 and 6.

Configuring Connection via odbc.ini

The connection can be set up either in ~/.odbc.ini (user level) or in the global odbc.ini (system level) file:

odbc.ini

BASH
[ODBC Data Sources]
# ODBC Data Source name is set here. Can be any arbitrary name. 
database1 = My Cool Database 

[database1]
# configuration for the ODBC Data Source 
 
# Description
Description = Data Virtuality example DSN
 
# Driver must match the name configured in odbcinst.ini
Driver = Data Virtuality Unicode(x64)

# User credentials
Username = admin 
Password = admin
 
# Address of Server
Servername = 192.168.1.3
 
# Data Virtuality Server listening port - 35433 for SSL connections, 35432 for non-SSL connections until not configured differently on Data Virtuality Server
Port = 35432
 
# Database name - must be datavirtuality
Database = datavirtuality

# SSL mode
SSLmode = disable
 
# Show SystemTables
# The driver will treat system tables as regular tables in SQLTables.
ShowSystemTables = No
 
# Send to backend on connection
ConnSettings =

# If true, the driver automatically uses declare cursor/fetch to handle SELECT statements
UseDeclareFetch = 1

Connection Test

To check if the ODBC connection is working correctly, you can use the isql utility:

isql connection

BASH
$ isql -v database1 <username> <password>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.