David Ehresmann wrote:
I used the lastest version as stated below.
I gunziped and untarred them in /tmp.
I installed DBI as root. It looked fine.
I installed DB as oracle . It looked fine.
Do you mean you did this whilst being the "oracle" user? Why did you
install DBD::Oracle as "oracle"? Does you oracle user have access to the
directories listed below?
While I run the connect.pl script I get the below error:
#!/usr/bin/perl
use warnings;
use strict;
use DBI;
my $dbh = DBI->connect('dbi:Oracle:orcl11g', 'HR','oracle');
die "connect failed: " . DBI->errstr() unless $dbh;
print "connect successful!\n";
$dbh->disconnect();
error:
$perl connect.pl
install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC
(@INC contains:
/usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /
usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4
/usr/lib/perl5/vendor_perl/5.8.3
/usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl .) at (eval 3) line 3.
The above list is all the places perl is looking for the DBD::Oracle
module - it did not find it. It was looking for a directory called DBD
which contained a file called Oracle.pm. Where did you install
DBD::Oracle? If you installed it in a non-standard place you need to add
a "-I non_standard_place" to the command line when you run your script.
Perhaps the DBD::Oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
at connect.pl line 7
These are the drivers found.
thanks.
Go back to how you installed DBD::Oracle and make sure the make install
actually worked. If you specified a non-standard place for the install
you need to specify it on the command line when running DBD::Oracle
dependent perl scripts.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com