gregorovius has asked for the wisdom of the Perl Monks concerning the following question:

I want to talk to a MS SQL database under NT from my perl program running on a Linux box. I've seen what the DBI-DBD faq says about this but the solutions offered (using DBI::Proxy on both sides, or a commercial product) appear convoluted, expensive and maybe slow.

Has anybody had experience with these solutions who can comment on how they perform, or know about other ways to do it?
  • Comment on Connecting to MS SQL Server from Perl-Linux

Replies are listed 'Best First'.
RE: Connecting to MS SQL Server from Perl-Linux
by KM (Priest) on May 24, 2000 at 22:19 UTC
    DBD::ODBC is worth looking at. Look for ODBC drivers for Linux at http://www.openlinksw.com, and a few other sites mentioned in the DBD::ODBC POD.

    Cheers,
    KM

RE: Connecting to MS SQL Server from Perl-Linux
by infoninja (Friar) on May 24, 2000 at 22:22 UTC
    I haven't used DBI::Proxy, but I've written a number of perl programs for a client using Freetds and DBD::Sybase to connect to MS SQL Server. I've got an early version of a HOW-TO written on getting all of it working here.
Re: Connecting to MS SQL Server from Perl-Linux
by lhoward (Vicar) on May 25, 2000 at 00:15 UTC
    One quick note about your statment:
    using DBI::Proxy on both sides,
    You don't actually use DBI::Proxy on both sides. You use DBD::ProxyServer on the MS SQL side and DBD::Proxy on the client side. DBD::ProxyServer runs in a daemon (or service, whatever your OS calls it) and uses another DBD driver (usually DBD::ODBC, but can be any DBD) to connect to the back-end database.

    If you have (or can get) Programming the Perl DBI by Alligator Descartes and Tim Bunce it covers setting up a DBD/DBI proxying in some detail.

Re: Connecting to MS SQL Server from Perl-Linux
by Anonymous Monk on May 25, 2000 at 09:24 UTC
    Hmm, I have used Easysoft's ODBC-ODBC bridge to make this work very easily. Check it out at Easysoft's web site. http://www.easysoft.com/products/oob/main.phtml
RE: Connecting to MS SQL Server from Perl-Linux
by Anonymous Monk on May 25, 2000 at 01:47 UTC
    I've been using the freetds driver and DBI to talk to MS-SQL 7.0. It works okay, but queries longer than than 502 bytes (that is the query itself Select...) will fail. I'm not exactly sure why this is, but I have a feeling it is due to some laziness on the part of freetds. The proxy server works fine too, but cannot only supports one connection at a time. Maybe this will be fixed now that perl will have a fork. -devkev (kevins@geocel.com)