ODBC Driver for Linux
The Jethro ODBC driver for Linux, enables access to the data stored in Jethro instances, from Business Intelligence (BI) applications with ODBC support.
The following sections specify the steps required for the installation and configuration of Jethro ODBC driver:
Installation and configuration
Download
Jethro ODBC drivers can be downloaded from the drivers download page.
Installation
To install the ODBC driver:
- Make sure that you have root permission.
Navigate to the directory where the download placed the file, and run:
rpm -ivh jethroODBC-3.0.0BETA-18094.x86_64.rpm
The driver will be installed under: /opt/jethro/jethroodbc/lib/libJethroODBC64.so
Setting a new connection (DSN)
To setup a DSN based connection to Jethro instance on Linux, configure a system DSN with the instance connection details.
Edit Jethro's driver configuration file: /opt/jethro/jethroodbc/lib/JethroODBC.ini, and uncomment the line with the ODBCInstLib parameter, under the corresponding Driver Manager being used by your BI application. Most chances are, your driver manager is UnixODBC. In such case, you will need to uncomment the line under "SimbaDM / unixODBC" (remove the '#' sign), and your file will look like that afterwards:
# To use this INI file, replace [INSTALLDIR] with the # directory the tarball was extracted to. [Driver] DriverManagerEncoding=UTF-8 DriverLocale=en-US ErrorMessagesPath=/opt/jethro/odbc/ErrorMessages/ LogLevel=0 LogNamespace= LogPath=/var/log/jethro/odbc/ ## - Uncomment the ODBCInstLib corresponding to the Driver Manager being used. ## - Note that the path to your ODBC Driver Manager must be specified in LD_LIBRARY_PATH (LIBPATH for AIX, DYLD_LIBRARY_PATH for Darwin). ## - Note that AIX has a different format for specifying its shared libraries. # Generic ODBCInstLib # iODBC #ODBCInstLib=libiodbcinst.so # SimbaDM / unixODBC ODBCInstLib=libodbcinst.so # Darwin specific ODBCInstLib # iODBC #ODBCInstLib=libiodbcinst.dylib # AIX specific ODBCInstLib # iODBC #ODBCInstLib=libiodbcinst.a(libiodbcinst.so.2) # SimbaDM #ODBCInstLib=libodbcinst.a(odbcinst.so) # unixODBC #ODBCInstLib=libodbcinst.a(libodbcinst.so.1)
- Edit the ODBC.ini file, typically located at /opt/jethro/odbc/conf/odbc.ini and update the following parameters within the file:
To connect to a single Jethro server, specify:
- SERVER- Host name or IP address of the machine that runs JethroServer.
- PORT - The port to which JethroServer listens, on the machine running JethroServer. The default port is 9111, but the actual port number can be verified on the server by viewing the configuration file $JETHRO_HOME/instances/services.ini.
To connect to multiple Jethro servers, by using the driver client-side load balancing feature, specify:
- SERVER - A list of host:port pairs, separated by semi-colons (or alternativaly - commas). For example: jethro01.mycorp.com:9111;jethro02.mycorp.com:9111;jethro03.mycorp.com:9111
- PORT - Leave empty.
In both cases, also specify:
- DATABASE -The name of the Jethro instance on the server.
- UID & PWD - The Default username & password is jethro.
# To use this INI file, replace [INSTALLDIR] with the # directory the tarball was extracted to. [ODBC Data Sources] JethroDataDSII=JethroODBCDriver [JethroDataDSII] Description=64-bit JethroData DSII Driver=/opt/jethro/jethroodbc/lib/libJethroODBC64.so Locale=en-US UID=jethro PWD=jethro SERVER=localhost PORT=9111 DATABASE=demo
Create and update the following required environment variables:
export JETHRO_ODBC_HOME=/opt/jethro/jethroodbc export ODBCINI=$JETHRO_ODBC_HOME/conf/odbc.ini export ODBCINSTINI=$JETHRO_ODBC_HOME/conf/odbcinst.ini export SIMBAINI=$JETHRO_ODBC_HOME/lib/JethroODBC.ini export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JETHRO_ODBC_HOME/lib
Setting a new connection (DSN-less)
Some BI applications allow setting up a DSN-less connection. The interface for setting up a DNS-less connection is BI tools specific, and it should generate a Jethro ODBC connection string. Jethro recommends using a DSN connection if possible, but some tools requires DSN-less connection string only.
To allow using a DSN-Less connection with Jethro, you need to define the driver in the odbcinst.ini file and then provide a DSN-less connection string in your application. If your machine is already configured to use an existing odbcinst.ini file, then update that file by adding the settings described below. Otherwise, copy the odbcinst.ini file from /opt/jethro/odbc/conf/ to the home directory (cp /opt/jethro/odbc/conf/odbc.ini ~/.odbc.ini), and then update the file as described below.
In the [ODBC Drivers] section, add a new line by typing 'JethroODBCDriver' as a name for the driver, an equal sign (=), and then 'Installed':
[ODBC Drivers] JethroODBCDriver=installed
Create a section that has the same name as the driver (as specified in the previous step - JethroODBCDriver), and then specify the following configurations:
[JethroODBCDriver] APILevel=1 ConnectFunctions=YYY Description=64-bit JethroData DSII Driver=/opt/jethro/jethroodbc/lib/libJethroODBC64.so DriverODBCVer=03.80 SQLLevel=1
- Connect to your instance by providing your application with a connection string. The elements format of the connection string is:
DRIVER={JethroODBCDriver};HOST={host};PORT={port};INSTANCE={instance_name};UID={user};PWD={password};
For example:
DRIVER=JethroODBCDriver;HOST=localhost;PORT=9111;INSTANCE=demo;UID=jethro;PWD=jethro;
Troubleshooting Connection Issues
If connection with the client is not successfully established, check the following troubleshooting suggestions:
- Verify that the JethroServer process is running on the server provided.
- Verify that the JethroServer port is accessible from the client (no firewalls are blocking the connection).
- Check the ODBC logs for valuable information (by default, located on /var/log/jethro/odbc/).
To enable logging:- Edit /opt/jethro/jethroodbc/lib/JethroODBC.ini, and set LogLevel to 6.
- Restart your BI application to create a new session.
- If you receive ODBC system error 193 when trying to connect – this is a generic ODBC error message meaning that a 32-bit application is trying to use a 64-bit driver. Ensure that you use a 64-bit version of the client application (BI tool and so on).
Configure Jethro ODBC connections with BI applications
Any general-purpose BI/SQL query tool that supports the SQL-92 standard should be able to connect with Jethro.
The instructions below refer to MicroStrategy, but other tools would most probably require a similar process to establish that connection.
- Edit /var/opt/MicroStrategy/env/ODBC.sh
Add the following lines of code at the end of the script:
SIMBAINI='/opt/jethro/odbc/conf/JethroODBC.ini'
export SIMBAINI - Use MicroStrategy connectivity wizard to create a DSN, using "MySql ODBC 5.x Driver" data base type. You will be required to provide the location of Jethro's driver.
The location is: /opt/jethro/jethroodbc/lib/libJethroODBC64.so - Alternatively, you can manually edit the MSTR odbc.ini file: /var/opt/Microstrategy/odbc.ini, and insert the DSN information manually:
- Under [ODBC Data Sources] add: yourdsnname=MySQL ODBC 5.x Driver
- Create a new DSN paragraph as explained above, for example:
[yourdsnname]
DriverUnicodeType=1
Description=MySQL ODBC 5.x Driver
PORT=9111
DATABASE=tpcds
CHARSET=utf8
SERVER=12.34.56.789
OPTION=2
SOCKET=
Driver=/opt/jethro/jethroodbc/lib/libJethroODBC64.so - edit odbcinst.ini and add the following line under [ODBC Drivers]:
JethroODBCDriver = Installed - add another paragraph:
[JethroODBCDriver]
APILevel=1
ConnectFunctions=YYY
Description=64-bit JethroData DSII
Driver=/opt/jethro/jethroodbc/lib/libJethroODBC64.so
DriverODBCVer=03.80
SQLLevel=1
Setup=/opt/jethro/jethroodbc/lib/libJethroODBC64.so