unixODBC not working with FreeTDS on AIX7.1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unixODBC not working with FreeTDS on AIX7.1

McBride, Jim

Hello,

 

First off, Happy New Year to all the folks on this list!!

 

Now, for my problem, I am having no luck getting unixODBC and FreeTDS to work together on AIX7.1.  I built them for my Solaris 10 server and they work great there, so not sure what I am doing wrong on AIX.

 

I have built both (64-bit) using gcc.  I can connect to my backend MSSQL database using the tools tsql and bsqldb, but I cannot get the utilities isql and bsqlodbc to connect as they both report “"[unixODBC][Driver Manager]Can't open lib '/apps/unixODBC/lib/libtdsodbc.a' : file not found"”

 

The library archive exists, and contains all the 64-bit objects:

 

sasown@a3pvap088:/apps/unixODBC/bin$ ar -t -v -X 64 /apps/unixODBC/lib/libtdsodbc.a

rw-rw-rw-  1519/1208  341174 Sep 25 10:24 2014 odbc.o

rw-rw-rw-  1519/1208   94192 Sep 25 10:24 2014 connectparams.o

rw-rw-rw-  1519/1208   78567 Sep 25 10:24 2014 convert_tds2sql.o

rw-rw-rw-  1519/1208   71153 Sep 25 10:24 2014 descriptor.o

rw-rw-rw-  1519/1208   78056 Sep 25 10:24 2014 prepare_query.o

rw-rw-rw-  1519/1208   98921 Sep 25 10:24 2014 odbc_util.o

rw-rw-rw-  1519/1208   70227 Sep 25 10:24 2014 native.o

rw-rw-rw-  1519/1208   77819 Sep 25 10:24 2014 sql2tds.o

rw-rw-rw-  1519/1208   98195 Sep 25 10:24 2014 error.o

rw-rw-rw-  1519/1208   61672 Sep 25 10:24 2014 odbc_checks.o

rw-rw-rw-  1519/1208   42379 Sep 25 10:24 2014 sqlwchar.o

rw-rw-rw-  1519/1208   93614 Sep 25 10:24 2014 bulk.o

rw-rw-rw-  1519/1208   77927 Sep 25 10:24 2014 challenge.o

rw-rw-rw-  1519/1208  106224 Sep 25 10:24 2014 config.o

rw-rw-rw-  1519/1208  166794 Sep 25 10:24 2014 convert.o

rw-rw-rw-  1519/1208   43363 Sep 25 10:24 2014 data.o

rw-rw-rw-  1519/1208   48695 Sep 25 10:24 2014 des.o

rw-rw-rw-  1519/1208   51988 Sep 25 10:24 2014 getmac.o

rw-rw-rw-  1519/1208   41304 Sep 25 10:24 2014 gssapi.o

rw-rw-rw-  1519/1208   33433 Sep 25 10:24 2014 hmac_md5.o

rw-rw-rw-  1519/1208  122683 Sep 25 10:24 2014 iconv.o

rw-rw-rw-  1519/1208   55375 Sep 25 10:24 2014 locale.o

rw-rw-rw-  1519/1208   96446 Sep 25 10:24 2014 log.o

rw-rw-rw-  1519/1208   99032 Sep 25 10:24 2014 login.o

rw-rw-rw-  1519/1208   40840 Sep 25 10:24 2014 md4.o

rw-rw-rw-  1519/1208   44584 Sep 25 10:24 2014 md5.o

rw-rw-rw-  1519/1208  120730 Sep 25 10:24 2014 mem.o

rw-rw-rw-  1519/1208   86651 Sep 25 10:24 2014 net.o

rw-rw-rw-  1519/1208   63608 Sep 25 10:24 2014 numeric.o

rw-rw-rw-  1519/1208  187773 Sep 25 10:24 2014 query.o

rw-rw-rw-  1519/1208   66517 Sep 25 10:24 2014 read.o

rw-rw-rw-  1519/1208   52039 Sep 25 10:24 2014 tds_checks.o

rw-rw-rw-  1519/1208   57749 Sep 25 10:24 2014 tdsstring.o

rw-rw-rw-  1519/1208   67128 Sep 25 10:24 2014 threadsafe.o

rw-rw-rw-  1519/1208  183525 Sep 25 10:24 2014 token.o

rw-rw-rw-  1519/1208   92043 Sep 25 10:24 2014 util.o

rw-rw-rw-  1519/1208   57959 Sep 25 10:24 2014 vstrbuild.o

rw-rw-rw-  1519/1208   31612 Sep 25 10:24 2014 win_mutex.o

rw-rw-rw-  1519/1208   64692 Sep 25 10:24 2014 write.o

rw-rw-rw-  1519/1208   12655 Sep 25 10:24 2014 asprintf.o

rw-rw-rw-  1519/1208     854 Sep 25 10:24 2014 fakepoll.o

rw-rw-rw-  1519/1208     858 Sep 25 10:24 2014 gettimeofday.o

rw-rw-rw-  1519/1208     851 Sep 25 10:24 2014 lt1-iconv.o

rw-rw-rw-  1519/1208   41193 Sep 25 10:24 2014 readpassphrase.o

rw-rw-rw-  1519/1208   12850 Sep 25 10:24 2014 strlcat.o

rw-rw-rw-  1519/1208   12820 Sep 25 10:24 2014 strlcpy.o

rw-rw-rw-  1519/1208   35045 Sep 25 10:24 2014 vasprintf.o

 

 

I have added /apps/unixODBC/lib to LIBPATH as well:

 

LIBPATH=/apps/oracle/instantclient:/apps/unixODBC/lib

 

 

Output of odbcinst –j

 

unixODBC 2.3.2

DRIVERS............: /apps/unixODBC/etc/odbcinst.ini

SYSTEM DATA SOURCES: /apps/unixODBC/etc/odbc.ini

FILE DATA SOURCES..: /apps/unixODBC/etc/ODBCDataSources

USER DATA SOURCES..: /home/sasown/.odbc.ini

SQLULEN Size.......: 8

SQLLEN Size........: 8

SQLSETPOSIROW Size.: 8

 

 

Odbcinst.ini

 

[FreeTDS]

Description     = FreeTDS 0.91 driver for ODBC MSSQL

Driver          = /apps/unixODBC/lib/libtdsodbc.a

 

 

 

Odbc.ini

 

[Data Sources]

VerisysRptDSN   = Verisys reporting SQLSRV database

VerisysDSN      = Verisys transaction SQLSRV database

 

[VerisysRptDSN]

Description     = Verisys reporting database

Driver          = FreeTDS

Trace           = Yes

TraceFile       = /apps/tck/logs/vsys_rpt.trace

Servername      = Verisys

Database        = vsys_rpt

 

[VerisysDSN]

Description     = Verisys transaction database

Driver          = FreeTDS

Trace           = Yes

TraceFile       = /apps/tck/logs/verisys.trace

Servername      = Verisys

Database        = Verisys

 

[Default]

Driver          = /apps/unixODBC/lib/libtdsodbc.a

 

 

Freetds.conf

 

#   $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $

#

# This file is installed by FreeTDS if no file by the same

# name is found in the installation directory.

#

# For information about the layout of this file and its settings,

# see the freetds.conf manpage "man freetds.conf".

 

# Global settings are overridden by those in a database

# server specific section

[global]

        # TDS protocol version

;       tds version = 4.2

 

        # Whether to write a TDSDUMP file for diagnostic purposes

        # (setting this to /tmp is insecure on a multi-user system)

        dump file = /apps/tck/logs/new-freetds-build.log

        debug flags = 0xffff

 

        # Command and connection timeouts

;       timeout = 10

;       connect timeout = 10

 

        # If you get out-of-memory errors, it may mean that your client

        # is trying to allocate a huge buffer for a TEXT field.

        # Try setting 'text size' to a more reasonable limit

;       text size = 64512

 

[Verisys]

        host = XXXXXXXXXX.XXX.COM

        port = 1433

 

 

 

I have used ldd on all the binaries and no libraries are reported as missing.

 

From the behavior I see, it appears that the driver itself is working (since tsql and bsqldb will connect), and that my issue is with unixODBC since it cannot find the driver.

 

I have read the docs for unixODBC and FreeTDS until my eyes bled, and also gone back through the last couple of years of archives for this mailing list…with no luck.

 

I am at my wit’s end on how to get this working on AIX…any help, or direction you can point me in, would be greatly appreciated!!!

 

Thanks!!!

 

Jim McBride

Sr. Application Analyst - Risk Control

( office:  713.331.6530 | ( fax:  402.916.8512 | * email: [hidden email]

emailsig

 

The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unixODBC not working with FreeTDS on AIX7.1

Nick Gorham-2
On 05/01/15 20:02, McBride, Jim wrote:

Hello,

 

First off, Happy New Year to all the folks on this list!!


And to you.

 

Now, for my problem, I am having no luck getting unixODBC and FreeTDS to work together on AIX7.1.  I built them for my Solaris 10 server and they work great there, so not sure what I am doing wrong on AIX.

 

I have built both (64-bit) using gcc.  I can connect to my backend MSSQL database using the tools tsql and bsqldb, but I cannot get the utilities isql and bsqlodbc to connect as they both report “"[unixODBC][Driver Manager]Can't open lib '/apps/unixODBC/lib/libtdsodbc.a' : file not found"”

 

The library archive exists, and contains all the 64-bit objects:

 

sasown@a3pvap088:/apps/unixODBC/bin$ ar -t -v -X 64 /apps/unixODBC/lib/libtdsodbc.a


Looks like its built an archive instead of a loadable library.

It needs to build something that dltest can open;

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unixODBC not working with FreeTDS on AIX7.1

McBride, Jim

Ah…okay…thanks for the quick response.  I have had no luck getting shareable libraries (.so) to compile on AIX.  I was worried that this was the issue.

 

Let me dig further into that conundrum.

 

Jim McBride

Sr. Application Analyst - Risk Control

( office:  713.331.6530 | ( fax:  402.916.8512 | * email: [hidden email]

emailsig

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nick Gorham
Sent: Monday, January 05, 2015 14:06
To: [hidden email]
Subject: Re: [unixODBC-support] unixODBC not working with FreeTDS on AIX7.1

 

On 05/01/15 20:02, McBride, Jim wrote:

Hello,

 

First off, Happy New Year to all the folks on this list!!


And to you.

 

Now, for my problem, I am having no luck getting unixODBC and FreeTDS to work together on AIX7.1.  I built them for my Solaris 10 server and they work great there, so not sure what I am doing wrong on AIX.

 

I have built both (64-bit) using gcc.  I can connect to my backend MSSQL database using the tools tsql and bsqldb, but I cannot get the utilities isql and bsqlodbc to connect as they both report “"[unixODBC][Driver Manager]Can't open lib '/apps/unixODBC/lib/libtdsodbc.a' : file not found"”

 

The library archive exists, and contains all the 64-bit objects:

 

sasown@a3pvap088:/apps/unixODBC/bin$ ar -t -v -X 64 /apps/unixODBC/lib/libtdsodbc.a


Looks like its built an archive instead of a loadable library.

It needs to build something that dltest can open;

--
Nick

The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Loading...