Having trouble trying to use DBD::Oracle with ActivePerl 5.8.8...

Posted by willjones on 2008-08-26 15:03

I am trying to use DBD::Oracle with ActivePerl version 5.8.8.822. I am able to run my code fine on a Linux OS, but when I run on Windows using ActivePerl I am getting the following error message...

install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at C:/Perl/lib/DynaLoader.pm line 229.
at (eval 34) line 3
Compilation failed in require at (eval 34) line 3.
Perhaps a required shared library or dll isn't installed where expected...

I found this page here that said DBD::Oracle wasn't compatible with ActivePerl v5.8.3, and it reccommends reverting back to version 5.6.1. The latest version at the time that was written was 5.8.3. Any ideas if this is still true now or what I should do to get DBD::Oracle working with ActivePerl 5.8.8 ?

Thanks...

grahams
ActiveState Staff
Wed, 2008-09-17 14:47

Try using the latest version of ActivePerl 5.8.8.824, or ActivePerl 5.10.0.1004. DBD-Oracle is shipped as a built in module with the 32-bit versions. It will expect you to have installed and configured Oracle Instant Client on your system before you load ActivePerl.

DBD-Oracle is only found in the PPM libraries for 5.6, so the article you referrenced is correct for older versions of 5.8.

vmcooper | Thu, 2008-10-23 06:34

I've installed Perl v5.8.8 built for MSWin32-x86-multi-thread. It seems to be working fine. I am, however, having trouble using the supplied DBD::Oracle in that it cannot seem to find my InstantClient which lives in my ORACLE_HOME directory. Is there a particular path this needs to be installed in other than where the environmental is pointing? I could use a little assistance here as I am under some deadlines for getting this working. I am getting an error dialog that "The application failed to start" that it cannot find OCI.dll. Additonally this appears in my console log:
09:31:14,457 INFO  [[/]] cgi: runCGI (stderr):install_driver(Oracle) failed: Can't load 'c:/Perl/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at c:/Perl/lib/DynaLoader.pm line 227.

Thanks!
-Vince

rbtate | Tue, 2008-09-23 11:33

I downloaded the AS-perl 5.8.8.824 (and later 5.10.0.1004 versions to test if it would work for me to do some Oracle access scripts, but after installing it, there is no DBD::Oracle module there. When I tried to see what was in the repo, it came back with zero entries. I'm trying to setup on a Solaris 9 system if it makes a difference.

Did I do something wrong, or isn't DBD::Oracle included in the Solaris versions?

raghavender | Sun, 2008-12-28 22:48

i am using ActivePerl 5.8.8.824 on windows and
installed oracle9.01 client

when i am using DBD::Oracle module by following code
#! /usr/bin/perl -w
use strict;
use warnings;
use Net::FTP;
use Term::ReadKey;
use DBI;
print"\n Enter the IP address of the the FTP Server : ";
chomp(my $ip=);
my $ftp = Net::FTP->new("$ip",Debug =>0,Passive =>1)
or die "Cannot connect to the remote host: $@";
print"\n please Enter","\n User Name : ";
chomp( my $username=);
print" Password : ";
ReadMode('noecho');
my $password=ReadLine(0);
ReadMode('normal');
$ftp->login("$username","$password")
or die" cannot login to remote server",ftp->message;
my $dbh = DBI->connect("DBI:oracle:AIXDB.COM",'CPT','CPTP')
or die "Cannot connect: $DBI::errstr\n";
print"Database connection is sucessful\n";
$dbh->disconnect;
print"Disconnect the Database connection\n";
$ftp->quit;
exit;
gives the error like this:
the procedure entry point OCIXML TypeCreateFromSrc could not be located in the dynamic link library OCI.dll

install_driver failed: Can't load 'C:/perl/lib/auto/DBD/Oracle/Oracle.dll' for
module DBD::Oracle: Load_file: The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 277, line3.
Compilation failed in require at line 3, line 3.
Perhaps a required shared library or dll isn't installed where expected at practice/dbconnect.plx line 37

please any one can help!

grahams
ActiveState Staff
Mon, 2011-11-14 16:24

Oracle 9.x is not compatible with Insta Client libraries. This means that you can't use the pre-installed versions of DBD-Oracle in an ActivePerl with an Oracle 9 or older.

For Oracle 9 and older you must build DBD-Oracle locally. See the Perl doc page on the CPAN install tool for how to build modules from source code.