IBM Support

Configuring Modeler Server on UNIX\Linux to use SAP HANA and IBM DB2 ODBC Drivers

Question & Answer


Question

How do I configure Modeler Server on UNIX\Linux to use SAP HANA and IBM DB2 ODBC drivers?

Answer

The general steps applicable to both of these are described in the IBM SPSS Modeler 15.0 FP1 Release Notes. You must be at 15.0 FP1 to use these ODBC drivers.

In order to use the IBM DB2 Driver there are additional driver requirements that need to be fulfilled after following the Modeler Server configuration steps in the 15.0 FP1 release notes:


1. Configure the db2cli.ini file in "db2 instance home/sqllib/cfg/db2cli.ini" to
add the following lines to define a DB2 client alias for your database.

[Data Source Name]
Database=DB name
Protocol=TCPIP
Port=50000
Hostname=ip or hostname
UID=username
PWD=password

2. In the odbc.sh script in your IBM SPSS Data Access Pack installation append the path to the IBM DB2 ODBC Driver to LD_LIBRARY_PATH or LIBPATH(AIX) environment variable. For example
if [ "$LD_LIBRARY_PATH" = "" ]; then
LD_LIBRARY_PATH=/userhome/test/SDAPZLinux/lib:/opt/ibm/db2/V9.5/lib64
else
LD_LIBRARY_PATH=/userhome/test/SDAPZLinux/lib:$LD_LIBRARY_PATH:/opt/ibm/db2/V9.5/lib64
fi
export LD_LIBRARY_PATH

3. In your odbc.ini file create a new ODBC data source for the DB2 database. Make sure Data Source Name is the same as what you specify in step 1 for your DB2 alias. As noted in the Modeler Server 15.0 FP1 release notes you also need to specify DriverUnicodeType=1 to avoid buffer overflow errors while connecting to the database. An example DB2 ODBC Datasource looks like this:

Data Source Name=DB2 ODBC Driver

[Data Source Name]
Driver=/opt/ibm/db2/V9.5/lib64/libdb2o.so
Description=Sample DB2 ODBC Database
DriverUnicodeType=1
DATABASE=SAMPLE

Please note, you must use the driver library libdb2o.so with Modeler and not the driver library libdb2.so

If not already installed on the Modeler Server machine the required DB2 driver can be obtained from the "IBM Data Server Driver for ODBC and CLI". Further information on this, including links to downloads, can be found here

[{"Product":{"code":"SS3RA7","label":"IBM SPSS Modeler"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Modeler","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"15.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21618950