Skip to Content.
Sympa Menu

freetds - Re: [freetds] sybperl and freetds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] sybperl and freetds
  • Date: Thu, 27 Jan 2005 21:24:44 -0500

Technoid <technoid AT gmail.com> wrote:
> I just inherited another freetds project from my employer.

Congratulations! ;-)

> Applications running on FreeBSD and IRIX access an OpenClient version
> of DBD::Sybase through two intermediate layers of wrappers.
...
> The DB_* wrappers in turn call
> Sybase::DBlib functions, which make calls to DBD::Sybase.

Sybase::DBlib wraps db-lib, and DBD::Sybase wraps ct-lib. The two modules
are independent.

> I am charged with helping convert from using OpenClient to using
> FreeTDS.
>
> I have written test cases that demonstrate that everything works fine
> if I make calls from my test script to freshly built FreeTDS versions
> of DBD::Sybase.

Excellent!

> suspect that I need to rebuild sybperl to correctly call DBD::Sybase.

Right. You need to relink the perl modules to use the FreeTDS shared
objects:

$ ldd $(find $(perl -e'print join $/, @INC' | grep ^/) -name '*yb*.so' |
sort -u)
/usr/pkg/lib/perl5/site_perl/5.6.1/i386-netbsd/auto/DBD/Sybase/Sybase.so:
[...]
-lct.1 => /usr/pkg/lib/libct.so.1
-ltds.2 => /usr/pkg/lib/libtds.so.2

or something like that....

> I've googled a bit to see if there are any specific instructions for
> building sybperl for use with FreeTDS, but thought I would also check
> to make sure I'm not making any false assumptions about using sybperl
> with FreeTDS.

Other than what's in the User Guide, what is it you need?

> (I'm wondering if--instead of trying to make sybperl
> work with FreeTDS--I should just tweak our home-grown wrappers to skip
> sybperl and interact with DBD::Sybase directly ...)

That sounds like a good idea. I wouldn't be surprised if the scripts
you're porting were originally written to db-lib or at least had
db-lib-isms in them. If you're more familiar with DBD::Sybase, you might
be better off scraping out the middle layer(s). It's hard to imagine what
functionality they're providing.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page