This chapter describes how to integrate with Altibase's Unix ODBC Driver.
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 Item||Setting Value||Description|
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)
libaltibase_odbc.so 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.
|LongDataCompat||ON||When using lob data, set to ON.|
Check the SQLLEN length information above as follows.
Testing ODBC Connection
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 libodbcinst.so cannot be found in LIBRARY_PATH, or connection is not possible even though it was installed normally for a specific reason.Check if the libodbcinst.so.1 file exists in the compiled source directory, and if libodbcinst.so for this does not exist, it can be solved by placing a symbolic link to libodbcinst.so.1 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.
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.
Example of unixODBC Trace output
If the trace.log is opened, the contents of the files can be checked as above.