ODBC driver for Linux
The ODBC client package works with Linux® as a 32-bit and 64-bit driver.
Downloading and configuring
- 64 bit
-
DSClients-linuxx64-dsdriver-... IBM Data Server Driver Package (Linux/x86-64 64 bit) ...
- 32-bit
-
DSClients-linuxia32-dsdriver-... IBM Data Server Driver Package (Linux/x86-32 32 bit) ...
ODBC driver directory structure
- \bin
- Contains the db2cli command.
- ..\lib
- Contains the runtime library file.
- ..\include
- Contains the header files that are used to compile client applications.
- ..\cfg
- Contains the sample configuration files: db2cli.ini.sample and db2dsdriver.cfg.sample.
OpenSSL library configuration
- To configure the OpenSSL library
to support the 32-bit ODBC client:
cd /lib
- Ensure that the libssl.so.<version> file
exists by running the following command:
ls -l libssl.so.<version>
- If the file exists, create a soft link by running the following
command:
ln -s libssl.so.<version> libssl.so.6
- Ensure that the link is created by running the following command:
The soft link is displayed asls -l libssl*
libssl.so.6 -> libssl.so.<version>
ODBC driver configuration
The configuration information for the ODBC driver is specified in the db2dsdriver.cfg file. For more information about the Data Server driver package, see Validating IBM Data Server Driver Package (Windows) installation.
Edit the db2dsdriver.cfg file
to provide the required DSN
alias and database
information.
Client application configuration
A client application must provide the DSN name to the ODBC driver.
If the client application does not need to be compiled first, the name is provided in the external data source configuration of the client application. These applications generally contain user-friendly interfaces and can be configured by using the interface of the application.
SQLConnect
SQLDriverConnect
These functions are useful for applications
that have no user interface. In these cases, the application must
reference the header file that is included in the following ODBC
directory, /includeexport LD_LIBRARY_PATH=<odbc/driver/lib/path>