Uploaded image for project: 'Solution Center'
  1. Solution Center
  2. SOL-153

Install EXASolution ODBC driver on AIX, HP-UX, Linux, MacOS, Solaris

    XMLWordPrintable

    Details

    • Type: How To
    • Status: Published
    • Affects Version/s: EXASolution 5.0
    • Fix Version/s: None
    • Component/s: ODBC
    • Labels:
      None
    • Solution:
      Hide

      Overview

      The correct configuration of ODBC on non-Windows systems is inherently complex due to the number of components and required workarounds. The EXASolution ODBC driver package provides a program to do the hard work for you.

      Installation

      Download the EXASolution ODBC driver package for Linux/UNIX/MacOS. Starting with version 5.0, there is only one package for all supported unix-like systems; tar.gz and tar.Z only differ in the used compression program.
      Always unpack on the target system.

      Linux and MacOS X
      tar -tzf EXASolution_ODBC-5.0.*.tar.gz
      
      Solaris
      gtar -xzf EXASolution_ODBC-5.0.*.tar.gz
      
      AIX and HP-UX
      uncompress -c EXASolution_ODBC-5.0.*.tar.Z | tar -xf -
      

      It's not important where the package is unpacked, but after configuration (next step) the install directory can not be changed without reconfiguration.

      Configuration

      Change into the install directory and start the interactive configuration program:

      cd  EXASolution_ODBC-*
      ./config_odbc
      

      The program covers the following steps:

      • Scan the system for available ODBC driver managers
      • Check for missing (3rd party) packages
      • Create an odbc.ini config file
      • Create a wrapper script to start applications
      • Test database connectivity
      • Guess the correct DSN an application needs based on the driver manager it uses

      config_odbc allows non-interactive use. Try

      ./config_odbc --help

      for details.

      Running Programs

      What is the correct DSN?

      config_odbc can guess the correct DSN for an application if that application has loaded the ODBC data manager (but not the ODBC driver).

      Just start your application and load the driver manager:

      • GUI applications: open the data source configuration dialog (or similar)
      • Scripting languages: import the ODBC module

      Then run config_odbc again in guessing mode:

      Example: Python
      python -c 'import time, pyodbc; sleep(10)' &
      ./config_odbc --mode=guess
      
      Example: Perl
      perl -e 'use DBI; DBI->data_sources("ODBC", \%attr); sleep 10' &
      ./config_odbc --mode=guess
      

      How to set the environment

      In almost all cases it is required that several environment variables are set. To simplify this task, config_odbc generates a wrapper script to start applications:

      ./exaodbc_wrapper DSN MyApp with some args
      

      "DSN" has to be replaced by the correct DSN for this application.

      exaodbc_wrapper can not communicate the DSN to the application, it just needs it to select the correct set of environment settings. The application has to set the DSN itself.

      Troubleshooting

      config_odbc does not start

      Some operating system have no or only a crippled Perl installation. Install a full Perl system and try again.

      Fix: minimal Debian
      apt-get install perl
      
      Fix: minimal CentOS 7
      yum install perl-Digest-MD5
      

      Configuration went well but applications can not connect

      Make sure EXASolution is reachable and the ODBC driver manager / ODBC driver combination works in principle. Use exaodbc_wrapper with a valid DSN for this purpose:

      Example: connection testing
      ./exaodbc_wrapper exasolution_uo2214lv2_64
      

      Calling exaodbc_wrapper without any argument provides the list of valid (configured) DSNs.

      Application can not load some libraries

      Try starting your application with the exaodbc_wrapper script as described above.

      Some applications may clean the environment for child processes they start. In that case exaodbc_wrapper will not work. The following trick works around this problem, but it is for experts only.

      Experts only

      If the application in question has its own lib directory (/your/app/lib/dir in the example below), link the driver directory into it:

      Fix (experts only)
      ln -s /path/to/driver/lib/dir/* /your/app/lib/dir
      

      Here, "/path/to/driver/lib/dir" is the directory of the appropriate driver library. The full path of which is given in the respective DSN section in the odbc.ini file.
      Messing with application's libraries is inherently dangerous and can lead to crashes and otherwise hard to diagnose errors. When in doubt, call support.

      Everything else

      After configuration config_odbc collects all necessary information for trouble shooting (it's own logfiles, system information, etc.) in support.tar. Please provide EXASOL support with this collection as it greatly reduces support round trip time and helps us helping you.

      Show
      Overview The correct configuration of ODBC on non-Windows systems is inherently complex due to the number of components and required workarounds. The EXASolution ODBC driver package provides a program to do the hard work for you. Installation Download the EXASolution ODBC driver package for Linux/UNIX/MacOS. Starting with version 5.0, there is only one package for all supported unix-like systems; tar.gz and tar.Z only differ in the used compression program. Always unpack on the target system. Linux and MacOS X tar -tzf EXASolution_ODBC-5.0.*.tar.gz Solaris gtar -xzf EXASolution_ODBC-5.0.*.tar.gz AIX and HP-UX uncompress -c EXASolution_ODBC-5.0.*.tar.Z | tar -xf - It's not important where the package is unpacked, but after configuration (next step) the install directory can not be changed without reconfiguration. Configuration Change into the install directory and start the interactive configuration program: cd EXASolution_ODBC-* ./config_odbc The program covers the following steps: Scan the system for available ODBC driver managers Check for missing (3rd party) packages Create an odbc.ini config file Create a wrapper script to start applications Test database connectivity Guess the correct DSN an application needs based on the driver manager it uses config_odbc allows non-interactive use. Try ./config_odbc --help for details. Running Programs What is the correct DSN? config_odbc can guess the correct DSN for an application if that application has loaded the ODBC data manager (but not the ODBC driver). Just start your application and load the driver manager: GUI applications: open the data source configuration dialog (or similar) Scripting languages: import the ODBC module Then run config_odbc again in guessing mode: Example: Python python -c ' import time, pyodbc; sleep(10)' & ./config_odbc --mode=guess Example: Perl perl -e 'use DBI; DBI->data_sources( "ODBC" , \%attr); sleep 10' & ./config_odbc --mode=guess How to set the environment In almost all cases it is required that several environment variables are set. To simplify this task, config_odbc generates a wrapper script to start applications: ./exaodbc_wrapper DSN MyApp with some args "DSN" has to be replaced by the correct DSN for this application. exaodbc_wrapper can not communicate the DSN to the application, it just needs it to select the correct set of environment settings. The application has to set the DSN itself. Troubleshooting config_odbc does not start Some operating system have no or only a crippled Perl installation. Install a full Perl system and try again. Fix: minimal Debian apt-get install perl Fix: minimal CentOS 7 yum install perl-Digest-MD5 Configuration went well but applications can not connect Make sure EXASolution is reachable and the ODBC driver manager / ODBC driver combination works in principle. Use exaodbc_wrapper with a valid DSN for this purpose: Example: connection testing ./exaodbc_wrapper exasolution_uo2214lv2_64 Calling exaodbc_wrapper without any argument provides the list of valid (configured) DSNs. Application can not load some libraries Try starting your application with the exaodbc_wrapper script as described above. Some applications may clean the environment for child processes they start. In that case exaodbc_wrapper will not work. The following trick works around this problem, but it is for experts only. Experts only If the application in question has its own lib directory ( /your/app/lib/dir in the example below), link the driver directory into it: Fix (experts only) ln -s /path/to/driver/lib/dir/* /your/app/lib/dir Here, "/path/to/driver/lib/dir" is the directory of the appropriate driver library. The full path of which is given in the respective DSN section in the odbc.ini file. Messing with application's libraries is inherently dangerous and can lead to crashes and otherwise hard to diagnose errors. When in doubt, call support. Everything else After configuration config_odbc collects all necessary information for trouble shooting (it's own logfiles, system information, etc.) in support.tar . Please provide EXASOL support with this collection as it greatly reduces support round trip time and helps us helping you.
    • Category 1:
      Clients, Interfaces & Drivers - ODBC

      Attachments

        Issue Links

          Activity

            People

            • Assignee:
              CaptainEXA Captain EXASOL
              Reporter:
              CaptainEXA Captain EXASOL
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: