Page 1 of 1

SQLBase 11 ODBC and unixODBC

PostPosted: Sun Dec 27, 2009 1:38 am
by makro
Good morning,
I have a problem installing ODBC drivers for Linux.
I have Debian/Ubuntu, I've installed sqlbase-common, sqlbase-client, sqlbas-odbc successfully.
Using sqllxtlk I can connect with no problems to my databases.
Using unixODBC isql -v command I always have
[01000][unixODBC][Driver Manager]Can't open lib '/opt/Unify/SQLBase/libsqlbaseodbc.so' : file not found

File exists, odbc.ini, odbcinst.ini and sql.ini are well configured.

ldd libsqlbaseodbc.so gives:
linux-gate.so.1 => (0xb789f000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb76d2000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb76b9000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb76b4000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb75c2000)
libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0xb75b4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7596000)
/lib/ld-linux.so.2 (0xb78a0000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7570000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0xb7565000)

Any helps?

Regards,
Marco

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Sun Dec 27, 2009 5:50 pm
by mvandine
Hi Marco,

Can you try setting: LD_LIBRARY_PATH=/opt/Unify/SQLBase

Does that solve the problem for you?

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Wed Dec 30, 2009 1:17 am
by makro
Hi Mike!
Thanks for reply.

Yes, I've already tried setting LD_LIBRARY_PATH with no success...

Regards,
Marco

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Sun Jan 10, 2010 2:48 am
by makro
Any news?

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Sun Jan 10, 2010 6:10 pm
by mvandine
Hi Marco,

I'm going to need to get a Linux specialist to have a look at this.

Best regards,

Mike

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Tue Jan 12, 2010 7:02 am
by jmgemperle
Hi,

Yes I tested this on Opensuse 11.2 and run into the same problem as you and everything seems to be fine, LD_LIBRARY_PATH and LDD and odbc.ini/odbcinst.ini.
So I installed SQLBASE 9.01 as I know this used to work and tested SQLBASE 9.01 client against the SB11.5 server and could connect...
Furthermore wanted to try the SB901 unixODBC driver in place of the SB11.5 version ( so using the sqlbase api of SB11.5) and I'm fine too with it
So it seems to be a problem in the libsqlbaseodbc.so and isql -v does not give much information...I guess a call in it fails for some reason

I entered the issue SQLB-1233 for this

In the mean time I attach you the driver of the version 9.01 for your convenience ( they are part of the driver pack).
just rename the 2 11.5 odbc .so file to so.11 and copy the one (9.01) attached and make a symlink of then to libsqlbaseodbc.so and libsqlbasesetup.so and with it you should be able to connect to your SB 11.5 server...
There might be problem but that is the best I can offer for the moment.


Cheers
Jean-Marc


bellow the ini files


;------ /etc/odbcinst.ini file begin -----
;
; odbcinst.ini
;
[ODBC Drivers]
Gupta SQLBase = Installed

[Gupta SQLBase]
Driver = /opt/Unify/SQLBase/libsqlbaseodbc.so
Setup = /opt/Unify/SQLBase/libsqlbaseodbcsetup.so


;------ /etc/odbc.ini file begin -----
;
; odbc.ini
;
[ODBC Data Sources]
gupta1=Gupta SQLBase ODBC Driver

[gupta1]
Driver=/opt/Unify/SQLBase/libsqlbaseodbc.so
Description=Gupta SQLBase DSN
DSN=gupta1
Servername=SERVER1
LoginID=SYSADM
Username=SYSADM
Password=SYSADM
Database=island
ini=/opt/Unify/SQLBase/sql.ini
InputMessageSize=2000
IsoLevel=Release Locks
LockTimeOut=300

[Default]
Driver = /opt/Unify/SQLBase/libsqlbaseodbc.so

;------ /etc/odbc.ini file end -----

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Tue Jan 12, 2010 8:55 pm
by mvandine
Thanks so much for looking into this, Jean-Marc!! You're a champion!

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Wed Jan 20, 2010 12:50 am
by makro
Hi again,
I've followed the above instructions, but with no success... same error for me...

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Mon Aug 29, 2011 6:23 am
by catalin2chaty
I have the same problem, your solution does't work :cry:

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Mon Aug 29, 2011 6:25 am
by catalin2chaty
makro wrote:Hi again,
I've followed the above instructions, but with no success... same error for me...

Can it be another solution? I still can't connect...

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Fri Sep 02, 2011 12:42 am
by catalin2chaty
catalin2chaty wrote:
makro wrote:Hi again,
I've followed the above instructions, but with no success... same error for me...

Can it be another solution? I still can't connect...

The sollution that is showed before works. I managed to implement it. My problem was that I had a linx64 version and the drivers are for win 32.
Thanks.

Re: SQLBase 11 ODBC and unixODBC

PostPosted: Mon Sep 29, 2014 2:50 am
by chaos_prevails
Hello,

the proposed solution from jmgemperle worked also for me on a Ubuntu 12.04 LTS 64 bit machine as client. I have the following remarks to make ik clearer:

1) the error message:
Code: Select all
Using unixODBC isql -v command I always have
[01000][unixODBC][Driver Manager]Can't open lib '/opt/Unify/SQLBase/libsqlbaseodbc.so' : file not found

should be first tried to solve via setting the LD_LIBRARY_PATH variable:
Code: Select all
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Unify/SQLBase


1.5) if that doesn't help, you might have installed the wrong architecture. for a 64bit machine you have to install the 64bit software you can download from http://www.guptatechnologies.com/Services/productDownloads.aspx?SqlBase (convert to deb with alien):
SQLBase-odbc-driver-11.7.2-9610.x86_64.rpm
SQLBase-common-11.7.2-9610.x86_64.rpm
SQLBase-client-11.7.2-9610.x86_64.rpm

2) another thing I found missing in the howto is the fact that you have to adapt the sql.ini to your configuration. To quote the gupta documentation http://support.guptatechnologies.com/Docs/SQLBase/Books/dba/dba_communications.htm:
[linuxclient.tcpip]
serverpath=server1,mymachine,2155/*
The "linuxclient.dll" section is a sort of placeholder to identify the communication protocol (always TCP/IP). The "linuxclient.tcpip" section provides more detail about communicating with specific database servers. If the client application was expected to communicate with several database servers, then there would be several "serverpath" statements in this section. In our example, the server named "server1" located on machine "mymachine" listens on TCP/IP port 2155. The asterisk means that the client can attempt to connect to any database on that server. If we wanted to restrict communication to a single database such as ISLAND, the line would look like:


so you have to look how the server (which is NOT the machine name) is called in your server sql.ini. This information can be found in the section [dbntsrv]. In my case the section looked like:
Code: Select all
[dbntsrv]
servername=ZZZZZ,sqlws32


So I had to adapt the linuxclient.tcpip section in the client sql.ini to:
Code: Select all
[linuxclient.tcpip]
serverpath=ZZZZZ,YYYYY,2155/* #<-- set server name (ZZZZZ) and host name (YYYYY) correctly
[dblxsrv]
servername=ZZZZZ #<--the server name (I guess something like an SQLBASE entity on the SQLBASE server)
dbdir=/opt/Unify/SQLBase
centurydefaultmode=1
ansijoinsyntax=1
cache=65536
DBNAME=XXXXX #<-- the database you want connect to, default ISLAND