[WindyCity-pm] installing the same module twice

Whitney Jackson whjackson at gmail.com
Fri Feb 13 17:21:06 PST 2009


> If you have a Sybase Open Client ODBC driver and can use the FreeTDS driver
> for MS SQL Server, then using a driver manager to pick different drivers for different
> databases is a well-traveled path.

I went ahead and installed unixODBC and DBD::ODBC.   As you point out
this is just what I need since it allows you to specify multiple
drivers and refer to the one you need when you configure your DSN.  I
just setup a test DSN and FreeTDS driver.  I'm able to successfully
connect using DBI/DBD::ODBC and run basic queries.  Thanks for the
advice!

> Could you say more about what exactly is missing in FreeTDS that is present in the
> Sybase Open Client libraries?

>From the DBD::Sybase documentation under 'Bulk-Load Functionality':

"NOTE: This feature requires that the libblk.a library be available at
build time. This is not always the case if the Sybase SDK isn't
installed. You can test the $dbh->{syb_has_blk} attribute to see if
the BLK api calls are available in your copy of DBD::Sybase."

This feature is labelled "Experimental" but I've had pretty good luck
with it so far.  It pretty much allows you to do the equivalent of a
bcp without having to create a bcp file and run an external command.

The other issue for me, is that it may be harder to get support from
my DBAs and ultimately Sybase for some issues when using FreeTDS.
That's just theoretical though.  I've been using FreeTDS for a while
now and it's never been an issue.

Thanks again for the help!

Whitney

On Fri, Feb 13, 2009 at 6:24 PM, Craig A. Berry <craigberry at mac.com> wrote:
>
> On Feb 13, 2009, at 5:04 PM, Whitney Jackson wrote:
>
>>> Is there a FreeTDS module out there you can use for the MSSQL db rather
>>> than trying to have two different varieties sharing the same namespace?
>>
>> This is the list of APIs freetds supports:
>>  http://www.freetds.org/software.html
>
> That's not a list of APIs; it's a list of software packages.  The API status
> is provided as a Perl script here:
>
> <http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/doc/api_status.txt?revision=1.61&view=markup>
>
>
>> The only thing that looks like a possibility is DBD::ODBC on top of
>> unixODBC on top of freetds.  I could try using that solution for
>> everything that needs FreeTDS.  I don't have any experience with
>> unixODBC but I suppose it might work.
>
> FreeTDS's ODBC driver does work, and I think on most platforms works with
> iODBC as well as unixODBC.  If you have a Sybase Open Client ODBC driver and
> can use the FreeTDS driver for MS SQL Server, then using a driver manager to
> pick different drivers for different databases is a well-traveled path.
>  Loading a different library at run-time based on directives in your
> connection string is the whole point of ODBC driver managers.
>
> Whether this "bulk write" feature that is apparently missing when using
> DBD::Sybase with FreeTDS would be supported by any given ODBC driver or
> driver manager is an open question.  Or by DBD::ODBC for that matter.  Could
> you say more about what exactly is missing in FreeTDS that is present in the
> Sybase Open Client libraries?
>
>>>> Does anyone know a clean way to install DBD::Sybase twice and have the
>>>> right one to load when I do a DBI connect?
>
>
> You should be able to create two separate installations by building twice
> using two different variations of:
>
> $ perl Makefile.PL INSTALL_BASE=/path/to/somewhere
>
> How to get the right one at run-time depends on whether you want to fiddle
> with PERL5LIB in the environment, "use lib" in your code, -Ilib on the
> command line, etc.
>
> ________________________________________
> Craig A. Berry
> mailto:craigberry at mac.com
>
> "... getting out of a sonnet is much more
>  difficult than getting in."
>                 Brad Leithauser
>
>


More information about the WindyCity-pm mailing list