Re: install_driver(Sybase) failed: DBD::Sybase initialize:




Anand,

It appears that your environment is not correctly setup. Check that you have sourced in the SYBASE.sh located at /opt/sybase11.9.2. It appears that DBD::Sybase attempted to call ct_init in the Sybase libs and failed to find it. Check the SHLIB_PATH. Use isql to connect to verify that open client is working properly. Then start digging into the perl code.


Desai, Anand (HP-GDIC) wrote on 4/11/2005, 8:58 AM:
> Help..
> I have been struggling to get DBI to work on my server...
> Here is the code..
> #! /usr/bin/perl
>
> #use strict;
> BEGIN
> {
> $ENV{SYBASE} = "/opt/sybase11.9.2";
> }
> use DBI;
> print "Here's a list of DBI drivers:\n";
>
> my @available_drivers = DBI->available_drivers('quiet');
> my $driver;
>
> foreach $driver (@available_drivers)
> {
> print "$driver\n";
> }
>
> foreach $key (sort keys(%INC)) {
> print "$key => $INC{$key}\n";
> }
>
> my $dbh =DBI->connect("dbi:Sybase:server=crisp", 'sa', '', {PrintError
> => 0});
>
>
> die "Unablee for connect to server $DBI::errstr"
> unless $dbh;
>
> my $rc;
> my $sth;
>
> $sth = $dbh->prepare("select \@\@servername");
> if($sth->execute) {
> while(@$dat = $sth->fetchrow) {
> print "@dat\n";
> }
> }
> my $key;
> and the output is
> Here's a list of DBI drivers:
> DBM
> ExampleP
> File
> Proxy
> Sponge
> Sybase
> AutoLoader.pm => /opt/perl-uxpe/lib/5.8.0/AutoLoader.pm
> Carp.pm => /opt/perl-uxpe/lib/5.8.0/Carp.pm
> Config.pm => /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Config.pm
> Cwd.pm => /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/Cwd.pm
> DBI.pm =>
> /opt/perl-uxpe/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi/DBI.pm
> DirHandle.pm => /opt/perl-uxpe/lib/5.8.0/DirHandle.pm
> DynaLoader.pm =>
> /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm
> Exporter.pm => /opt/perl-uxpe/lib/5.8.0/Exporter.pm
> Exporter/Heavy.pm => /opt/perl-uxpe/lib/5.8.0/Exporter/Heavy.pm
> ExtUtils/Installed.pm => /opt/perl-uxpe/lib/5.8.0/ExtUtils/Installed.pm
> ExtUtils/Liblist.pm => /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist.pm
> ExtUtils/Liblist/Kid.pm =>
> /opt/perl-uxpe/lib/5.8.0/ExtUtils/Liblist/Kid.pm
> ExtUtils/MM.pm => /opt/perl-uxpe/lib/5.8.0/ExtUtils/MM.pm
> nstall_driver(Sybase) failed: DBD::Sybase initialize: ct_init(1100)
> failed at /opt/perl-uxpe/lib/5.8.0/PA-RISC1.1-thread-multi/DynaLoader.pm
> line 249.
> Compilation failed in require at (eval 36) line 3.
>
> at ./test.pl line 29
> can someone please help
>
> Anand Desai

--
Your Friendly Neighborhood DBA,

Chuck
.



Relevant Pages

  • Re: Perl 6 DBI API ideas
    ... Though I didn't raise my hand when you asked for people to contribute to a DBI module for Perl 6, I've had some ideas that I thought about sharing. ... I would also love to see some standardization on the driver names ("mysql" when it's normally written ... DBI is supposed to be query language agnostic, even if SQL is the most commonly used group of languages, and if a user can declare this explicitly, it saves the driver from having to guess what they were given, which might be ambiguous. ...
    (perl.dbi.users)
  • Re: Perl script doesnt behave well
    ... use DBI; ... use strict; ... It is best to declare variables at their point of first use, ... scope is necessary, as for $VALUE-A and $VALUE-B, for which see below. ...
    (perl.beginners)
  • Re: DBI and character sets (yet again)
    ... I don't really want the DBI to be involved in any recoding ... When selecting data from the database the driver should: ... - return strings which have a unicode character set as UTF8. ... - return strings with other character sets as-is on ...
    (perl.dbi.users)
  • DBD::ODBC make test fails
    ... I installed DBI ... this looks like a unixodbc type of driver manager. ... Undefined subroutine &main::BAILOUT called at t/02simple.t line 23. ... ok 2 - use ODBCTEST; ...
    (perl.dbi.users)
  • RE: ORACLE DRIVER
    ... DBI - is the perl module to handle all the request of the database, connecting, disconnecting, routing the database request to proper driver. ... DBD::Oracle - is the Oracle driver that DBI can use to handle oracle request. ...
    (perl.dbi.users)