Issue with Connection Oracle 11.2 database from Perl.
778223Nov 9 2010 — edited Nov 9 2010Hello,
We are trying to connect oracle 11.2 database from a perl script. I have verified that DBD::ORACLE version is 1.19. The environment is linux environment. Linux is SuSE linux and version is 10 SP1.
The code we are executing is
============
#!/usr/bin/perl -w
use strict;
use DBI;
my $db = DBI->connect( "dbi:Oracle:SID", "USERID", "XXXXXX" )
|| die( $DBI::errstr . "\n" );
my $SEL = "SELECT sysdate FROM DUAL";
my $sth = $db->prepare($SEL);
$sth->execute();
my($cdate);
while ( $sth->fetch() ) {
Print "DATE: $cdate\n";
}
$sth->finish() ;
=======================
We are receiving following error:
install_driver(oracle) failed: Can't locate DBD/oracle.pm in @INC (@INC contains
b/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8
d-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at (eval
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, Oracle, Proxy, Sponge, mysql.
at ./conn_db.pl line 4
Please let us knowhow to resolve the issue?