Configuring the ODBC driver for Linux® and AIX systems

The ODBC driver is used for providing data in relational form to the extract, transform, and load framework of Cognos® Business Intelligence for returning the result sets for ETL jobs and live reports. If the driver is installed at a location other than the default location, you must to configure the library path of the driver so that you can connect to the data source.

Before you begin

Make sure that your system has an ODBC driver manager installed. You can download any ODBC driver manager of your choice and install it according to the installation instructions contained at the download site for the driver manager. For example, you can download the unixODBC driver manager (version 2.2.14 or later) from the unixODBC Project website, and install the driver.

About this task

During the installation process, the ODBC driver is configured to use the JDBC jar files in the [[Cognos_BI_InstallDir]/etl/jdbc directory. If your driver files are located in a different directory, change the LIBPATH parameter of the ODBC driver.

Procedure

  1. Go to [Cognos_BI_InstallDir]/etl/odbc/ directory and edit the odbcinst.ini file to make sure that the string value of the Driver parameter is the path of [Cognos_BI_InstallDir]/etl/odbc/libratlxml.so file.
  2. In the odbc.ini file, make sure that the string value of the Configuration parameter is the path of your configuration file.
    Example code:
    [ClearCase]
    Driver = IBM Rational XML ODBC Driver
    DataSource = ClearCase
    Description =
    Configuration = /opt/[Cognos_BI_InstallDir]/etl/configs/Configurations/clearcase.xdc
  3. Find the path of your installed driver configuration file, odbcinst.ini, and system DSN file, odbc.ini.
    You can use the following command to find out the path of the odbcinst.ini file: odbcinst -j.
    Tip: Use the command which odbcinst to determine the path of the odbcinst. If multiple unixODBC drivers are installed, ensure that you use the first libodbcinst.so file, found in LD_LIBRARY_PATH or LIBPATH. If the odbcinst is under the /usr/local/bin, the related libodbcinst.so file is always under the /usr/local/lib folder.
    Here is an example of the driver paths if your ODBC driver is installed correctly:
    unixODBC 2.3.0
    DRIVERS............: /usr/etc/odbcinst.ini
    SYSTEM DATA SOURCES: /usr/etc/odbc.ini
    FILE DATA SOURCES..: /usr/etc/ODBCDataSources
    USER DATA SOURCES..: /root/.odbc.ini
    
  4. Verify that the odbcinst.ini file contains the following lines.
    • Linux:
      [IBM Rational XML ODBC Driver]
      Description=
      Driver={path of libratlxml.so}
      Driver64=/usr/local/lib 
      Setup={path of libratlxmlS.so}
      Setup64=/usr/local/lib
      LIBPATH={the path of jdbc directory}
      MaxActiveStatements=100
      QueuingTimeout=100000
      DefaultPageSize=1000
      
      Example code:
      [IBM Rational XML ODBC Driver]
      Description=
      Driver=/opt/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so
      Driver64=/usr/local/lib 
      Setup=/opt/IBM/RRDI/etl/odbc/libratlxmlS.so
      Setup64=/usr/local/lib
      LIBPATH=/opt/IBM/RRDI/etl/jdbc5
      MaxActiveStatements=100
      QueuingTimeout=100000
      DefaultPageSize=1000
      
    • AIX:
      [IBM Rational XML ODBC Driver]
      Description=
      Driver={path of libratlxml.so}
      Driver64=/usr/local/lib 
      Setup64=/usr/local/lib
      LIBPATH={the path of jdbc directory}
      MaxActiveStatements=100
      QueuingTimeout=100000
      DefaultPageSize=1000
      
      Example code:
      [IBM Rational XML ODBC Driver]
      Description=
      Driver=/opt/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so
      Driver64=/usr/local/lib 
      Setup64=/usr/local/lib
      LIBPATH=/opt/IBM/RRDI/etl/jdbc
      MaxActiveStatements=100
      QueuingTimeout=100000
      DefaultPageSize=1000
      
      Note that libratlxmlS.so is not installed by Cognos Business Intelligence on AIX® systems.
  5. Copy the [Cognos_BI_InstallDir]/etl/odbc/odbc.ini file to the SYSTEM DATA SOURCE path as shown in system output when you ran the odbcinst -j command in step 3. For example, /usr/etc/odbc.ini
  6. Copy the [Cognos_BI_InstallDir]/etl/odbc/odbcinst.ini file to the DRIVERS as shown in system output when you ran the odbcinst -j command in step 3. For example, /usr/etc/odbcinst.ini.
  7. AIX Add the contents of the [Cognos_BI_InstallDir]/etl/odbc/odbcinst.ini and [Cognos_BI_InstallDir]/etl/odbc/odbc.ini to the /etc directory.
  8. Set [Cognos_BI_InstallDir]/etl/odbc/lib as the library path.
    • Linux: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/IBM/RRDI/etl/odbc/lib
    • AIX: LIBPATH=$LIBPATH:/opt/IBM/RRDI/etl/odbc/lib:/opt/IBM/RRDI/etl/jre5/bin/j9vm
  9. After you set the environment variables, run the command, ldd [Cognos_BI_InstallDir]/etl/odbc/libratlxml.so to ensure that all dependent library of libratlxml.so file is found.
    Example code:
    ldd /opt/IBM/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so 
    	linux-gate.so.1 =>  (0xffffe000)
    	libpthread.so.0 => /lib/libpthread.so.0 (0xf7f89000)
    	libicuuc.so.38 => /opt/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so/etl/odbc/lib/libicuuc.so.38 (0xf7e64000)
    	libicuio.so.38 => /opt/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so/etl/odbc/lib/libicuio.so.38 (0xf7e5a000)
    	libc.so.6 => /lib/libc.so.6 (0xf7d14000)
    	/lib/ld-linux.so.2 (0x00a00000)
    	libicudata.so.38 => /opt/[Cognos_BI_InstallDir]/etl/odbc/libratlxml.so/etl/odbc/lib/libicudata.so.38 (0xf723c000)
    	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf7151000)
    	libm.so.6 => /lib/libm.so.6 (0xf712a000)
    	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf711e000)
    	libicui18n.so.38 => /opt/IBM/RRDI/etl/odbc/lib/libicui18n.so.38 (0xf6fd0000)
    
  10. Verify that the DSN is working.
    For example, for live reporting with Rational® Quality Manager, if you have downloaded the XML data configuration file rqm301-live.xdc and the data source name is RQM Live, use the following command:
    isql "RQM Live"

What to do next

In case of any error, enable the debug and trace flag in the odbcinst.ini file and run the following commands:
  • to debug:
    jdbclogpath=/tmp/jdbc.log
    Debug=/tmp/odbc.log
  • to trace:
    [ODBC]
    Trace=Yes
    TraceFile=/tmp/odbc_u.log