I am trying to configure an Oracle connection from Perl running on a Windows 7 
desktop to an Oracle 11g database running on Linux; however the database 
connection step is failing.

The following line of perl code fails:

   use DBD::Oracle;

Below is the full error message:

Can't load 'C:/Perl64/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: 
load_file:%1 is not a valid Win32 application at C:/Perl64/lib/DynaLoader.pm 
line 191. at C:\go\perl\tracker\pingOracle.pl line 17.

The following line of perl code fails with a similar error message:

   $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid;port=$port", $user, 
$passwd);

The version of my Perl install is:

# C:\Perl64\bin>perl -v
# 
# This is perl 5, version 16, subversion 3 (v5.16.3) built for 
MSWin32-x64-multi-thread
# (with 1 registered patch, see perl -V for more detail)
# Binary build 1603 [296746] provided by ActiveState http://www.ActiveState.com
# Built Mar 13 2013 13:31:10

The DBI version is: 1.623
The DBD::Oracle version is 1.58

I'm running 64 bit Windows and 64 bit Perl. Is it possible the DBD loader is 
failing because it is trying to load a 32 bit version of the Oracle driver?

The Oracle 11.2 client package of drivers is installed on the same desktop PC 
and these drivers successfully connect my Toad client to the Oracle database. 

From the Perl error message above, it appears Perl is trying to load a driver 
that was installed along with ActiveState Perl.

Should I try to configure Perl to use the Oracle 11.2 drivers? Or should Perl 
be loading drivers installed from ActiveState?

Any help or thoughts would greatly appreciated.  -Tony

Reply via email to