vassago has asked for the wisdom of the Perl Monks concerning the following question:

I'm using ActivePerl build 1004 and EPIC in eclipse and when trying to use DBI to connect to an Oracle database I get this error:
install_driver(Oracle) failed: Can't load 'C:/Perl/lib/auto/DBD/Oracle +/Oracle.dll' for module DBD::Oracle: load_file:The specified module c +ould not be found at C:/Perl/lib/DynaLoader.pm line 202. at (eval 4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at C:/Documents and Settings/rthatche/My Documents/workspace/Junk/aad +t.pl line 35
I tried this in Windows Powershell (basically the dos shell with some linux commands built in) and get the same thing. DBD and DBI are installed. I tried uninstalling and reinstalling ActivePerl and that didn't help. I know the code works fine because I've used it before with no problems. I also checked and the Oracle.dll is in the directory it says it's looking for it in. Could my CLASSPATH or something else have got messed up? I'm using WinXP Pro and I need this to work, but I can't find any info on how to fix it. Thanks for any help.

Replies are listed 'Best First'.
Re: oracle driver, dbd, dynaloader.pm
by morgon (Priest) on May 18, 2009 at 20:35 UTC
    Is the Oracle-client properly installed?

    (DBD::Oracle needs the Oracle-client libs - the Oracle.dll you mention in your post belongs to DBD::Oracle and is NOT an Oracle-client by itself)

    Verify the Oracle-client by connecting via SQLPlus.

      Yes, the Oracle client is working fine. I can connect using SQLPlus and by using Java, I just can't connect with Perl anymore.
        Unfortunately I am not a Windows-expert.

        I assume that the Oracle.dll (from DBD::Oracle) fails to load the Oracle client-libs (probably another dll), so you probably have to tell it where to find it.

        There must be an equivalent of LD_LIBRARY_PATH to configure a list of directories in which to search for shared libs and I think it is PATH, but I am not 100% sure.

        Try to add the directory where the oracle-client-dlls reside to PATH and run your script again - worth a try.