APM: which ODBC do-dads?

erik at debill.org erik at debill.org
Fri Aug 20 10:02:59 CDT 2004


On Thu, Aug 19, 2004 at 04:21:40PM -0500, Jeremy Brooks wrote:
> Folks,
>   I need to access a Microsoft SQL server from a Perl application
> running on a Linux machine.  I have DBI installed and have been using it
> for quite sometime with the mysql driver.  I've downloaded DBD-ODBC-1.09
> and now I need to get a "driver manager" and a driver to access the
> Microsoft SQL database... hmmm.  It looks like there are several
> option.  Who here has experience enough to give me some suggestions on
> which "driver manager" and driver to use?   

We're using freetds and DBD::Sybase here at NCSoft.  I just inherited
it so I can't say why that was picked, but it looks to be working
fine.  Installation was pretty straightforward.  Just add compiling
and configuring freetds to the usual DBI/DBD setup.  Freetds manages
hostnames and ports, your connect string points to an entry in the
freetds.conf file.

2 bits of weirdness:

1.  We seem to need tds version set to 4.2.  "If it's set to 7.0
that's a bug".  Apparently it will work right for most things, but
screw up if you're doing large chunks of text or binary data.  I've
not seen it, that's the folklore around here.

2.  You don't specify a database name anywhere in the connection info.
Threw me for a loop.  It just connects to the default database for the
user you log in as.  After that I do a $dbh->do("use $databasename");
to get to the db I want.


Erik

-- 
Well I'm walking through the sand
In the desert of my mind
And I don't remember what it was
That I came here to find
  -- Sister Machine Gun "Alone"


More information about the Austin mailing list