I'm trying to connect an OpenACS 5.1.3 instance running on Aolserver 4.0.10,
PostgreSQL 7.4 and Linux SUSE 9 to a DB2/400.
My understanding is that I need the nsodbc module, which in turn requires an
unixODBC manager and a DB specific driver.
Starting from the bottom, after some research, I installed StarSQL which is
well documented and supported. The following are my .odbc.ini
[ODBC Data Sources]
DB2PROD=StarSQL
[DB2PROD]
AutoTypDefNam=QTDSQL400
Server=S448609A
Driver=/usr/share/starsql/lib/libSWODBC.so
PkgColId=STARSQL
Netlib=SWTCP32.DLL
HostName=192.168.0.50
port=446
and my odbcinst.ini
[ODBC Drivers]
StarSQL =Installed
[ODBC]
Trace = 0
Trace File = /tmp/sql.log
InstallDir = /usr/share/starsql/odbc
[StarSQL]
Driver=/usr/share/starsql/lib/libSWODBC.so
Description=StarSQL
FileUsage=1
They are working, because I can starping the DB2 and also connect to it via
isql, but I'm having problems starting my webserver (Aolserver).
StarSQL provides its own unixODBC manager and so I compiled the nsodbc
module of Aolserver against /usr/share/starsql/odbc (the internal unixODBC
manager) and modified the config.tcl script adding the new nsodbc.so, wich
is loaded normally, and a new database pool (pool4) beyond the other
PostgreSQL pools.
The following is the relevant section of my config.tcl:
ns_param odbc ${bindir}/nsodbc.so ; # Load ODBC driver
ns_section ns/db/pools
ns_param pool1 "Pool 1"
ns_param pool2 "Pool 2"
ns_param pool3 "Pool 3"
ns_param pool4 "DB2"
ns_section ns/db/pool/pool4
ns_param driver odbc
ns_param connections 1
ns_param datasource DB2PROD
ns_param user a00
ns_param password a00
ns_param logsqlerrors on
ns_param verbose on
I'm not completely sure that the datasource parameter is correct: this is
what I use to succesfully connect via isql.
During Aolserver startup i get this error and I don't know how to proceed.
[-main-] Notice: dbdrv: opening database 'odbc:DB2PROD'
[-main-] Notice: odbc[pool4]: attemping to open 'DB2PROD'
[-main-] Error: odbc[pool4]: odbc message: SQLSTATE = 01000, Native err = 0,
msg = '[unixODBC][Driver Manager]Can't open lib
'/usr/share/starsql/lib/libSWODBC.so' : libSQLPARSER.so: cannot open shared
object file: No such file or directory'
[-main-] Error: dbdrv: failed to open database 'odbc:DB2PROD'
Apparently the driver manager is pointing to libSWODBC.so and
libSQLPARSER.so and both exist and are readable.
Hope that someone can shed some light and help me to proceed
Best regards,
Claudio Pasolini
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.