Re: Getting Error Message "Can't load 'C:/Perl64/lib/auto/DBD/Oracle/Oracle.dll" While Connecting to Oracle

Tony Byorick <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>

Thanks for the responses to my question.

I have not found a root cause for the problem however, I have found a workaround by installing the 32 bit version of ActiveState Perl and using it rather than the 64 bit version.

With 32 bit Perl, "$dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid;port=$port", $user, $passwd);" performs without complaining and then executes SQL and returns the answer set.

-Tony



________________________________
 From: Alexander Foken <[email protected]>
To: Tony Byorick <[email protected]>; "[email protected]" <[email protected]> 
Sent: Monday, January 27, 2014 11:04 AM
Subject: Re: Getting Error Message "Can't load 'C:/Perl64/lib/auto/DBD/Oracle/Oracle.dll" While Connecting to Oracle
 


On 26.01.2014 01:19, Tony Byorick wrote:

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.
[...]


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?
Yes. The "bitness" of Perl and the database libraries must match,
    not only for Oracle, but for every database (and every C/C++ library
    you want to use from Perl).

 [...]
>
>
>
Try to get a 64 bit Oracle client, or use a 32 bit Perl.

Alexander


-- 
Alexander Foken mailto:[email protected] http://www.foken.de/alexander/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.