Unable to run perl on windows 7 64-bit machine (DBD::Oracle error)

Posted by sanjeevgattu on 2012-10-31 23:13


I tried to run a perl program on windows 7 64-bit machine which is compiled and generated with PDK 8.2.1 32-bit build. It is throwing error as below

"install_driver(Oracle) failed: Can't load 'C:/Perl/lib/auto/DBD/Oracle/Oracle.dl
l' for module DBD::Oracle: load_file:%1 is not a valid Win32 application at C:/P
erl/lib/DynaLoader.pm line 201.
at (eval 6) line 3
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn't installed where expected
at twconnectsql.perl line 2229"

It happens only on windows 7 64-bit machine, and I wonder it works fine on all other 64-bit machines and 32 bit machines. Kindly help me in resolving this issue. I am unable to find out whether it is problem with oracle or perl. I have oracle 11G (64-bit) installed on the machine. But there is no difference in other environments except the OS which is windows 7 64-bit. It also works fine in windows 7 32-bit system.

Sanjeev Gattu

ActiveState Staff
Mon, 2012-11-05 12:59

The 32-bit Perl contains a DBD::Oracle with links to 32-bit Insta-client. When it runs, it will expect to find an already installed 32-bit Oracle client. It will not be able to use a 64-bit Oracle client.

The reverse is also true. A 64-bit Perl has a DBD::Oracle with links to a 64-bit Insta-client. When it runs, it will not be able to use a 32-bit Oracle client.

You may well be able to resolve your problem on your Win 7 64-bit system by ensuring that both 32-bit and 64-bit Oracle client versions are available.

sanjeevgattu | Mon, 2012-11-19 03:06

Thanks for your response,

I am now able to run perl by installing 32-bit oracle client.