Skip to content

Help getting ODBC to work

2 messages · Thorsten Muehge, Dirk Eddelbuettel

#
Dear Debian Experts,
Im am switched from windows to UBUNTO 9.04 (Jaunty).
As before I want to use R for my statistical analysis (connectiing to IBM
DB2).

Installation of the RODBC Package worked without problems.

However I have a problem getting the DB2 ODBC to work properly.

Although this is not really R related, maybe someone is able to help
me.....

What I did:
1.Download of IBM DB2 Drivers for ODBC and CLI from IBM DB2 support page
(v9fp7_linux_db2driver_for_odbc_cli.tar.Z)
2. Create Directory: /home/thorsten/db2_cli_odbc_driver
3. Copy the zipped file to the directory and unzip
4. Edit the /home/thorsten/db2_cli_odbc_driver/clidriver/cfg/db2cli.ini
file
[COMMON]
Trace=0
TracePathName=/home/thorsten/db2_cli_odbc_driver/clidriver/trace
TraceComm=1
TraceFlush=1
TraceTimeStamp=1

[SCAMS]
Database=SCAMS
Hostname=vacma4mz.vac.hu.ibm.com
Port=50000
Protocol=TCPIP

4. Edit the /etc/odbc.ini file
[ODBC Data Source]
SCAMS=IBM DB2 ODBC DRIVER

[WBBURT1]
Driver=/home/thorsten/db2_cli_odbc_driver/clidriver/lib/libdb2.so
Description=MYDB2 DB2 ODBC Database
5. Test connection by # isql -v SCAMS userid password
6. Error Message: [IM002][unixODBC][Driver Manager]Data source name not
found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

In fact testing it with RODBC give identical error messages....

Does anybody know how to fix it??
5 days later
#
On 19 August 2009 at 10:23, Thorsten Muehge wrote:
| Dear Debian Experts,
| Im am switched from windows to UBUNTO 9.04 (Jaunty).
| As before I want to use R for my statistical analysis (connectiing to IBM
| DB2).
| 
| Installation of the RODBC Package worked without problems.
| 
| However I have a problem getting the DB2 ODBC to work properly.
| 
| Although this is not really R related, maybe someone is able to help
| me.....
| 
| What I did:
| 1.Download of IBM DB2 Drivers for ODBC and CLI from IBM DB2 support page
| (v9fp7_linux_db2driver_for_odbc_cli.tar.Z)
| 2. Create Directory: /home/thorsten/db2_cli_odbc_driver
| 3. Copy the zipped file to the directory and unzip
| 4. Edit the /home/thorsten/db2_cli_odbc_driver/clidriver/cfg/db2cli.ini
| file
| [COMMON]
| Trace=0
| TracePathName=/home/thorsten/db2_cli_odbc_driver/clidriver/trace
| TraceComm=1
| TraceFlush=1
| TraceTimeStamp=1
| 
| [SCAMS]
| Database=SCAMS
| Hostname=vacma4mz.vac.hu.ibm.com
| Port=50000
| Protocol=TCPIP
| 
| 4. Edit the /etc/odbc.ini file
| [ODBC Data Source]
| SCAMS=IBM DB2 ODBC DRIVER
| 
| [WBBURT1]
| Driver=/home/thorsten/db2_cli_odbc_driver/clidriver/lib/libdb2.so
| Description=MYDB2 DB2 ODBC Database
| 5. Test connection by # isql -v SCAMS userid password
| 6. Error Message: [IM002][unixODBC][Driver Manager]Data source name not
| found, and no default driver specified
| [ISQL]ERROR: Could not SQLConnect
| 
| In fact testing it with RODBC give identical error messages....
| 
| Does anybody know how to fix it??

I find ODBC somewhat tedious and difficult to configure.  I have working
stanzas for PostgreSQL and MySQL and I would in a first instance suggest that
you try one of these.  Why?  It will give you an assurrance that your odbc
layer itself is working, and you can the try RODBC with it.

What is then left is to configire DB2 and ODBC. That is probably not even all
that specific to Debian or Ubuntu and you may find help on the Web for this
last aspects.  But given the previous step, you should be in a position to
then concentrate on "just getting DB2 connected" rather than maybe also
fighting unixODBC or iODBC.

Hth, Dirk