install_driver(Sybase) failed: DBD::Sybase initialize:
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
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 [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
Re: install_driver(Sybase) failed: DBD::Sybase initialize:
On Mon, 2005-04-11 at 14:58, Desai, Anand (HP-GDIC) wrote: 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; } 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. In general this means that the actual Sybase libraries that are loaded are of an older version level than the ones used to build the DBD::Sybase module. Another possibility is that your Sybase installation is somehow incorrect. The first thing to check is the SHLIB_PATH (I think that's what it's called under HP-UX) to make sure that the correct Sybase library directory is picked up at run-time, and second you should check that the libraries in $SYBASE/lib are the right ones (for example, run strings $SYBASE/lib/libct.a | grep Sybase and see what version string you get. As an example, I get: Sybase Client-Library/15.0/A/DRV.15.0.0/Linux Intel/Linux 2.4.21-20.ELsmp i686/BUILD1500-032/OPT/Mon Feb 28 16:00:11 2005 In your case you should get 11.1.1 instead of the 15.0, and probably some EBF string. Michael -- Michael Peppler - [EMAIL PROTECTED] - http://www.peppler.org/ Sybase DBA/Developer Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html