Skip to end of metadata
Go to start of metadata

This chapter describes how to integrate with Altibase's Unix ODBC Driver.

Setting ODBC.INI

Set the following in the environment variable of the user account.

This setting refers to the configuration file that records the connection information of the odbc driver will be used as the specified file.

Write the following in /home/unixODBC/etc/odbc.ini and save.

  • Example of odbc.ini
  • Main setting values
Setting ItemSetting ValueDescription


It is provided according to the bit and the important thing is the confirmation of ul64/32. In the compilation state of some ODBC Managers, the definition of SQLLEN is different from 4 bytes/8 bytes, so an error may occur from the connection stage.

As there is, it is necessary to check how SQLLEN is defined when compiling the ODBC Manager. (Not a 32/64bit distinction) is an odbc driver used with a 32bit unixodbc driver. This file is included in the Altibase 32bit client package.

To be precise, the user must check and write the bits in the file. (Confirm with file <FileName>)

If unixodbc is compiled with 32bit and used, this driver must be specified and used.

LongDataCompatONWhen using lob data, set to ON.


Check the SQLLEN length information above as follows.

shell> /home/unixODBC/bin] ./odbcinst -j unixODBC 2.3.2 DRIVERS............: /home/unixODBC/etc/odbcinst.ini .................... SQLULEN Size.......: 4 ( 8, if 64bit ) SQLLEN Size........: 4 ( 8, if 64bit ) SQLSETPOSIROW Size.: 2


The odbc driver to be used must be different according to the SQLLEN size defined in unixODBC. In the case of SQLLEN = (4byte/32bit), should be used for the odbc driver. When SQLLEN = (8byte/64bit), use

Testing ODBC Connection

When the setting is completed as above, perform the following in the directory where the unixODBC Manager is installed.


If the normal connection prompt is shown as above, it can be seen that the connection to the DB is normally performed. In the case of AIX, sometimes the file of cannot be found in LIBRARY_PATH, or connection is not possible even though it was installed normally for a specific reason.

Check if the file exists in the compiled source directory, and if for this does not exist, it can be solved by placing a symbolic link to and placing it in LD_LIBRARY_PATH.

In the case of SUN, the connection is possible only when the lib path of unixODBC Manager is set in LD_LIBRARY_PATH_64.

Setting ODBC trace logs

By logging the ODBC function called from unixODBC as a file, it can be usefully used when analyzing the cause of a problem.

The following is how to configure unixODBC to record trace logs.

  1. Setting ODBCINST.INI file

    Set as above in odbcinst.ini in the same directory path as the path where the odbc.ini file is located. DSN name must use [ODBC]. TraceFIle setting value is the location and file name of the file to which the contents to be logged will be recorded. Trace = Yes/No Logging can be selected.

  2. Example of unixODBC Trace output

    If the trace.log is opened, the contents of the files can be checked as above.



  • No labels