2

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

  • Perl -v - This is perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x86-multi-thread-64int
  • OS is Win 2008 R2 SP1
  • Ora client is 12.1.0 (64 bit)

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

2
  • Did you install the OCI component of the Oracle client? Are you installing the Oracle Instant Client for 12c? Commented Apr 16, 2016 at 3:12
  • Oracle Client 12c is installed and I do see the ocu.dll in the <ORACLE_HOME>12.1.0\client_1\BIN folder Commented Apr 18, 2016 at 16:52

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks to the details you provided, it helped. It is the oracle client in the path that needs to match the bit of PERL. ORACLE_HOME had no impact on my installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.