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 [EMAIL PROTECTED]@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