DBD::Sybase, FreeTDS problem

D

Daniel Berger

Hi all,

Perl 5.8.2
Solaris 9
FreeTDS 0.63 (20040622)
DBI 1.42
DBD::Sybase 1.04

I installed FreeTDS 0.63 successfully. I can definitely connect using
tsql. However, when I try this simple script I get an error.

use strict;
use warnings;
use DBI;
use DBD::Sybase;

my $login = "user";
my $passwd = "xxxx";
my $server = "SOME-SERVER";
my $host = "somehost";
my $port = 1030;

$ENV{SYBASE} = "/usr/local";
my $dbh = DBI->connect("dbi:Sybase:server=$server;host=$host;port=$port",$login,
$passwd);

$dbh->disconnect();

The error is: This version of OpenClient doesn't support CS_SERVERADDR
at /opt/csw/lib/perl/site_perl/DBD/Sybase.pm line 87.

I saw nothing in the archives or on Google about this. Any ideas?

Regards,

Dan
 
M

Michael Peppler

Hi all,

Perl 5.8.2
Solaris 9
FreeTDS 0.63 (20040622)
DBI 1.42
DBD::Sybase 1.04

I installed FreeTDS 0.63 successfully. I can definitely connect using
tsql. However, when I try this simple script I get an error.

use strict;
use warnings;
use DBI;
use DBD::Sybase;

my $login = "user";
my $passwd = "xxxx";
my $server = "SOME-SERVER";
my $host = "somehost";
my $port = 1030;

$ENV{SYBASE} = "/usr/local";
my $dbh =
DBI->connect("dbi:Sybase:server=$server;host=$host;port=$port",$login,
$passwd);

$dbh->disconnect();

The error is: This version of OpenClient doesn't support CS_SERVERADDR at
/opt/csw/lib/perl/site_perl/DBD/Sybase.pm line 87.

DBD::Sybase doesn't use the host/port method of connecting to a database
server. Instead it uses a logical server name defined in the interfaces
file (or in the freetds.conf file.)

The only exception is when using Sybase OpenClient 12.5.1 or later, where
the API has the ability to by-pass the interfaces file.

If "SOME-SERVER" is defined in your freetds.conf file you can simply
remove the host/port info from the DSN and it should work correctly.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top