DBD::Sybase, FreeTDS problem

Discussion in 'Perl Misc' started by Daniel Berger, Jun 23, 2004.

  1. 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
    Daniel Berger, Jun 23, 2004
    #1
    1. Advertising

  2. On Wed, 23 Jun 2004 14:15:34 -0700, Daniel Berger wrote:

    > 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
    --
    Michael Peppler Data Migrations, Inc.
    http://www.peppler.org/
    Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
    long term contract positions - http://www.peppler.org/resume.html
    Michael Peppler, Jun 24, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vince

    DBD::Sybase install errors

    Vince, Aug 22, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,374
    Vince
    Aug 22, 2003
  2. Richard Gration
    Replies:
    1
    Views:
    144
    Richard Gration
    Jul 7, 2005
  3. Richard Gration
    Replies:
    5
    Views:
    300
    Richard Gration
    Jul 7, 2005
  4. Jim Cochrane
    Replies:
    0
    Views:
    109
    Jim Cochrane
    Aug 25, 2007
  5. Andrew
    Replies:
    0
    Views:
    199
    Andrew
    Aug 15, 2009
Loading...

Share This Page