Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::Sybase connect problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Khurt Williams <khurtwilliams AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] DBD::Sybase connect problems
  • Date: Wed, 16 Mar 2005 17:18:53 -0500

Thanks for the reply.
The script has the same response whether run as root or some other
user and the permissions are correct.

-bash-2.05b$ ls -ltr
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/
total 212
-r--r--r-- 1 root root 23060 Mar 31 2003 dbd-sybase.pod
-r--r--r-- 1 root root 2792 Dec 15 07:48 NullP.pm
-r--r--r-- 1 root root 44813 Dec 16 11:39 DBM.pm
-r--r--r-- 1 root root 7795 Dec 16 11:46 Sponge.pm
-r--r--r-- 1 root root 11412 Dec 17 07:54 ExampleP.pm
-r--r--r-- 1 root root 67748 Dec 19 04:52 Sybase.pm
-r--r--r-- 1 root root 26539 Jan 20 06:15 Proxy.pm
-r--r--r-- 1 root root 19878 Mar 14 11:39 File.pm

There is only one perl on the host.

I followed the suggestion regarding the connection string and go the
same error. I am stumped.

Is there anything I should look for in the freetds log that would help?


On Wed, 16 Mar 2005 16:51:50 -0500, patrick.dunnigan AT centivia.com
<patrick.dunnigan AT centivia.com> wrote:
> That's not a connectivity problem. Possibly a permissions problem. The
> DynaLoader is trying to dynamically load the DBD:Sybase shared libraries
> and can't seem to find them. Make sure the use running the perl script can
> see the files under /usr/lib/perl5/site_perl/5.8.0/i686-linux/DBD (or
> whatever the library path is).
>
> Also could be if you have two Perls on the box, and you installed DBD
> Sybase on one but are running the script against the other.
>
> Doubtful, but it may be something to do with the multi threaded perl that
> comes with ES 3. You may want to download the latest stable perl and build
> DBI and DBD against that.
>
> Lastely, as a suggestion: if you specify the whole connection string in the
> perl script, you can forget about having to modify freetds.conf everytime
> you want to access a different db. Put the port and tds version in the
> global settings of freetds.conf and use the following conn string (if you
> want):
>
> my $dbh =
> DBI->connect("dbi:Sybase:server=<servername>;database=<dbname>","<userid>",
> "<password>",{RaiseError => 1}) or die "Can't connect: $DBI::errstr";
>
>
> >I downloaded and compiled FreeTDS to access a SQL Server 2000 database
> >from Red Hat Enterprise Linux ES release 3.
> >
> >I compiled with the following options:
> >-bash-2.05b$ tsql -C
> >locale is "en_US"
> >locale charset is "ISO-8859-1"
> >Compile-time settings (established with the "configure" script):
> > Version: freetds v0.62.4
> > MS db-lib source compatibility: no
> > Sybase binary compatibility: unknown
> > Thread safety: no
> > iconv library: yes
> > TDS version: 8.0
> > iODBC: no
> > unixodbc: no
> >I can conntect to the SQL Server with the tsql utility and execute queries.
> >
> >-bash-2.05b$ tsql -U testuser -S REMOTEDB
> >locale is "en_US"
> >locale charset is "ISO-8859-1"
> >Password:
> >Msg 5703, Level 0, State 1, Server REMOTEDB, Line 0
> >Changed language setting to us_english.
> >
> >However whenever I connect to the database from Perl using the
> >DBD::Sybase (1.05) I get the following error.
> >
> >-bash-2.05b$ ./db.pl
> >cs_config(CS_LOC_PROP) failed at
> >/usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 249.
> >
> >My db.pl scripts is as follows.
> >
> >#!/usr/bin/env perl
> >use strict;
> >use diagnostics;
> >use DBI;
> >
> >BEGIN {
> > $ENV{SYBASE} = '/utils/freetds';
> > $ENV{DSQUERY} = 'REMOTEDB';
> >}
> >
> >my $user = 'testuser';
> >my $passwd = 'testpassword';
> >
> >my $dbh =
> > eval { DBI->connect( 'dbi:Sybase:', $user, $passwd ); }
> > or die($!);
> >
> >$dbh->disconnect();
> >
> >The script never makes it pass the connect statement.
> >
> >My freetds conf look like this.
> >
> ># A typical Microsoft SQL Server 2000 configuration
> >[REMOTEDB]
> >; host = 192.168.1.15
> > host = remotedb.mydomain.com
> > port = 1433
> > tds version = 7.0
> >
> >Can someone point me in the right direction?
> >
> >--
> >Sincerely,
> >Khurt Williams, MSE, CISSP
> >
> >
> >
> >
> >--
> >Sincerely,
> >Khurt Williams, MSE, CISSP
> >_______________________________________________
> >FreeTDS mailing list
> >FreeTDS AT lists.ibiblio.org
> >http://lists.ibiblio.org/mailman/listinfo/freetds
> >
> >
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>


--
Sincerely,
Khurt Williams, MSE, CISSP




Archive powered by MHonArc 2.6.24.

Top of Page