[Melbourne-pm] Connecting to a MSSQL 2005 server

Guy Morton guy at alchemy.com.au
Wed Jun 9 21:03:30 PDT 2010


Hello fellow perlers,

I am having trouble getting DBI to connect to an MSSQL 2005 server.

I have FreeTDS installed. 

I have DBD::Sybase installed:

$ perl -MDBI -e 'DBI->installed_versions;'
  Perl            : 5.008008	(i386-freebsd-64int)
  OS              : freebsd	(6.1-release)
  DBI             : 1.607
  DBD::mysql      : 4.010
  DBD::Sybase     : 1.02
  DBD::Sponge     : 12.010002
  DBD::SQLite2    : 0.33
  DBD::SQLite     : 1.14
  DBD::Proxy      : install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC
  DBD::Gofer      : 0.011565
  DBD::File       : 0.35
  DBD::ExampleP   : 12.010007
  DBD::DBM        : 0.03

So, it *kinda* looks like this:

use DBI;

my $dbh = DBI->connect("dbi:Sybase:server=myserver", 'user','pass') || die $DBI::errstr;

should work, but it generates this error instead:

DBI connect('server=myserver','user',...) failed: (no error string) at mssqltest.pl line 3
Died at mssqltest.pl line 3.

Anyone got any clues they can throw me?

regards

Guy


More information about the Melbourne-pm mailing list