Reputation: 709
Having issues with Perl 5.20.2 and Oracle::DBD, getting following error when trying to connect to Ora 12C DB, run out of ideas on how to identify what is wrong here.
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:%1 is not a valid Win32 application at C:/Perl/lib/DynaLoader.pm line 194.
at (eval 72) line 3.
Compilation failed in require at (eval 72) line 3
My environment is as follows
Windows Environmental variables
ORACLE_HOME=C:\Oracle12c\product\12.1.0\client_1
Path=C:\Oracle12c\product\12.1.0\client_1\bin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPo werShell\v1.0\;c:\dmake;D:\NTRESKIT
TNS_ADMIN=C:\Oracle12c\product\12.1.0\client_1\bin
Upvotes: 2
Views: 8819
Reputation: 709
Figured it out...issue was not a files permission issue, the clue was in the "...not a valid Win32 application" verbiage.
I was using Ora 64 bit client instead of 32-bit, removed the Oracle 12c 64-bit client and installed Oracle 12c 32-bit client (you can also install the 11g driver (apparently an Oracle client supports one version back and one version forward)).
I required the full 12c Ora client installer as I need access to the database tools like sqlloader, note that there is a bug in the 12c Oracle 32-bit installer, had to modify the install/oraparam.ini and replace MSVCREDIST_LOC=vcredist_x64.exe with MSVCREDIST_LOC=vcredist_x86.exe, took me a while to find the installer, link here, http://www.oracle.com/technetwork/database/enterpriseedition/downloads/database12c-win64-download-2297732.html , 32-bit driver at bottom of url, hopefully they will fix the installer)
Also, very important to also add an ORACLE_HOME Win env path, I also added the Oracle client to the Path and ensured that it was before the Perl entries in my Windows Path.
Upvotes: 4
Reputation: 1628
Along with the comment I made above, please look at the following here on stackoverflow:
Upvotes: 0