Skip to Content.
Sympa Menu

freetds - RE: SQL2000, perl, and Apache

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Eric Deutsch" <edeutsch AT systemsbiology.net>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: SQL2000, perl, and Apache
  • Date: Mon, 19 Mar 2001 11:49:20 -0800



> From: bounce-freetds-127899 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-127899 AT franklin.oit.unc.edu]On Behalf Of
> Stephanie Shaw
>
> Background: Newbie. Very much so. This is only my second database I have
> tried to connect to using perl
> Problem: Need to connect to a SQL2000 database, from a *nix environment.
> My understanding is that DBI::Sybase will only work with SQL 6.x and SQL
> 7.x (please correct me if I am wrong), so I am checking into freeTDS.

I have used DBI::Sybase + FreeTDS drivers to connect to Microsoft
SQL Server 2000 from perl running on Linux with some success, although
I have run into some issues with NUMERIC and TEXT datatypes and
dynamic SQL (with ?'s) is not yet supported. So it works mostly,
but not completely. There seems to be an ongoing thread about INSERTs
with more than 13 columns failing. So, it seems to work well for some
simple stuff, but for complex stuff, FreeTDS seems not to be quite
robust yet. I'm looking forward to the day when FreeTDS does ODBC and
all these things are ironed out, though!

General Question:
I am under the impression from the FreeTDS FAQ that DBI::Sybase should
be used instead of DBI::FreeTDS. Is this still true for connecting
Linux perl to MS SQL Server 2000? Because of the FAQ answer, I've
never even tried DBI::FreeTDS.

In exploring other ways to connect to SQL Server 2000 from perl on
Linux, I have tested the EasySoft ODBC-ODBC Bridge package. It is not
free for multi-user use, but seems to be free for single-connection-
at-a-time personal use (www.easysoft.com).

If you install this and unixODBC, the software allows you to create
DSN's under Linux which get "bridged" to a DSN on the Windows + SQL 2000
server. Then you just use DBI::ODBC in perl. I have gotten this to
work well. My test scripts that fail with FreeTDS (testing some of the
issues mentioned above) do work with this solution, but I have not
done extensive tests. The advantage of this solution is that other
applications which can make use of ODBC (besides perl) can also
connect to the SQL Server. The disadvantage is they want close to
$1k for it, and you do need to install the bridge server on the Windows
machine (runs as a service), and then a client on the Linux machine.


> However, I have been unable to find detailed information on connecting
> using perl and freeTDS. Can someone please point me in the correct
> direction to find connection information? Or if there are suggestions on
> a better connection method than freeTDS, please advise. Thank you!
> Stephanie






Archive powered by MHonArc 2.6.24.

Top of Page