Skip to Content.
Sympa Menu

freetds - Re: [freetds] Problem trying to install freeTDS 0.64 on aix 5.3.0 .0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <james.k.lowden AT alliancebernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Problem trying to install freeTDS 0.64 on aix 5.3.0 .0
  • Date: Thu, 25 Jan 2007 13:24:46 -0500

> From: Darren Stokes
> Sent: Thursday, January 25, 2007 10:44 AM
>
> I have set up a freetds.conf file, and referenced it in my $ODBCINI
> file (initially preferring to go down the ODBC-combined route).
> The 'tsql' command is working (i believe), However im just 'exiting'
> the utility - not entirely sure what sort of thing I can do in
> that. The output is as follows:
>
> # ./tsql -S MyServer2k -U DBUser -P 0840
...
> 1> exit

You're right, you connected to the database, which is clearly progress.
You can issue queries at that point. tsql works much like isql.

> I don't
> have libtdsodbc.so anywhere, but i have a similar one with an
> extension of .a
..
> I've attempted to try and use the libtdsodbc.a in my odbc.ini file,
> but when i run isql, i get the following:
...
> Cannot load module /usr/local/freeTDS/lib/libtdsodbc.a.
> 0509-026 System error:
> Cannot run a file that does not have a valid format.
> [ISQL]ERROR: Could not SQLConnect
>
> So, I am now assuming that I don't have the correct driver installed
> for me to be able to connect.

I think your odbc.ini is OK, or close enough for now. You can test it
with my osql script; it's not in 0.64 but you can get it from any recent
snapshot. I'm always interested in feedback.

The problem appears to be that you don't have a shared object for
unixODBC to load. AIX is odd in that its linker doesn't produce .so
files. AIUI the .a files are (or can be) shared objects i.e. can be
used by the runtime linker. (Normally a .a is a static library, used by
the static linker to produce an executable.) To find out if yours is,
try this command:

$ file /usr/local/freeTDS/lib/libtdsodbc.a

If file(1) tells that's a static library, you need to run your linker
again with different options to persuade it to produce the shared
objects you need. This is what I would do (knowing nothing about AIX):

$ cd src/odbc
$ rm *.a
$ nohup make
$ grep libtdsodbc.a nohup.out

and look for the command that outputs libtdsodbc.a. Grab that command
and make a little shell script of it, because it may take a few tries to
get the options you need. Diddle with the options until the result is a
shared object. Relink everything that way, "make install" and try isql
again.

According to
"http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/
com.ibm.aix.genprogc/doc/genprogc/shared_object_runtime_linking.htm"
(Creating a Shared Object with Runtime Linking Enabled) it looks like
the linker wants a "-G" option.

HTH.

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.





Archive powered by MHonArc 2.6.24.

Top of Page