[unixODBC-support] ISQL Error on Connect to DB2

Martin J. Evans martin.evans at easysoft.com
Fri Mar 27 20:09:04 GMT 2009


Ralph Hershkowitz/NYLIM wrote:
> oracle at pnyorclux83:/usr/local/etc> isql -v NYL nylife xyz
> [01000][unixODBC][Driver Manager]Can't open lib
> '/opt/home1/db2inst1/sqllib/lib/libdb2.so' : ld.so.1: isql: fatal:
> /opt/home1/db2inst1/sqllib/lib/libdb2.so: wrong ELF class: ELFCLASS64
> [ISQL]ERROR: Could not SQLConnect

So I'd guess this is running on a 64bit machine? and given it is /opt - 
possibly Solaris?

isql/unixODBC is built 32bit and your ODBC driver is 64bit - you cannot 
mix. You need a 32bit isql/unixODBC and ODBC driver or a 64 bit 
isql/unixODBC and ODBC driver - not one of each. Get/rebuild unixODBC 
64bit and use your existing ODBC driver or get a 32bit DB2 driver and 
keep existing unixODBC (I'd actually recommend the latter for now as I'm 
guessing the next issue is going to be whether SQLLEN is the same size 
in unixODBC and DB2 if you use the 64bit versions). Nick will be more up 
to date than me on this and I'm sure he'll see this thread later.

Martin

> Ralph Hershkowitz
> DBA Manager
> New York Life Investment Management
> (973)-394-3352
> 
> 
>                                                                            
>              "Martin J. Evans"                                             
>              <martin.evans at eas                                             
>              ysoft.com>                                                 To 
>              Sent by:                  Support for the unixODBC project    
>              unixodbc-support-         <unixodbc-support at mailman.unixodbc. 
>              bounces at mailman.u         org>                                
>              nixodbc.org                                                cc 
>                                                                            
>                                                                    Subject 
>              03/27/2009 03:46          Re: [unixODBC-support] ISQL Error   
>              PM                        on Connect to DB2                   
>                                                                            
>                                                                            
>              Please respond to                                             
>               Support for the                                              
>              unixODBC project                                              
>              <unixodbc-support                                             
>              @mailman.unixodbc                                             
>                    .org>                                                   
>                                                                            
>                                                                            
> 
> 
> 
> 
> Ralph Hershkowitz/NYLIM wrote:
>> I am able to connect to remote db NYL using db2connect however isql
> doesn;t
>> seem to work
> 
> You appear to have hijacked someone elses thread - please start a new
> one in future.
> 
>> $ isql NYL nylife xyz
>> [ISQL]ERROR: Could not SQLConnect
>>
> 
> add a -v to that isql line and what does it output:
> 
> $ isql -v NYL nylife xyz
> 
> 
>> oracle at pnyorclux83:/usr/local/etc> more odbcinst.ini
>> [DB2]
>> Description     = DB2 Driver
>> Driver          = /opt/home1/db2inst1/sqllib/lib/libdb2.so
>> FileUsage       = 1
>> DontDLClose     = 1
>>
>> oracle at pnyorclux83:/usr/local/etc> more odbc.ini
>> [NYL]
>> Description     = Test to DB2
>> Driver          = DB2
>> Database        = NYL
>>
>>
>> Any ideas?
> 
> On the face of it look ok but -v will tell us more.
> 
> Martin
> 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
> 
> 
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
> 
> 



More information about the unixODBC-support mailing list