[unixODBC-support] problem using odbc for db2

Nick Gorham nick at lurcher.org
Wed Aug 12 08:11:49 BST 2009


sunny_helo wrote:
> Hi Nick,
> Sorry to bother you again. Let me describe my installation step:
> 1. I install DB2_ESE_V9.103_PPC on the pseries computer
> 2. I install unixodbc by the following steps:
>
> ./configure --enable-gui=no --prefix=/usr/local/unixodbc
>
> ./make
>
> ./make install
>
> 3. I config the php as follows
>
> ./configure --prefix=/usr/local/php/ --with-ldap 
> --with-apxs2=/usr/local/apache/bin/apxs 
> --with-unixODBC=/usr/local/programs/unixODBC
>
> make
>
> make install
>
> 4. run "odbc_config --odbcini --odbcinstini --lib-prefix" to get the 
> location of configuration and lib files
> 5. config the odbc.ini and odbcinst.ini as follows
> in odbc.ini file:
> [BVDB]
> Description = Test to db2
> Driver = DB2
> in odbcinst.ini file:
> [DB2]
> Desciption = driver for db2
> Driver = /usr/local/odbcunix/lib/libdb2.so
> FileUsage = 1
> DontDLClose = 1
> 6. copy the libdb2.so files to the place specified by "odbc_config 
> --lib-prefix" command
> 7. In my computer I use isql command:
> isql bvdb user password
> it works
> but on the server I user the same command it just cannot work and 
> returns "ERROR: could not SQLConnect". Could you tell me if there's 
> anything wrong with the installation steps above?
That all looks fine.

I would try adding -v to isql to get errors

isql -v bvdb user password

Also test loading the lib

dltest /usr/local/odbcunix/lib/libdb2.so SQLConnect

-- 
Nick


More information about the unixODBC-support mailing list