How to Install DBD::Oracle in Strawberry Perl

喜你入骨 提交于 2019-11-30 12:49:18

DBD::Oracle is notoriously difficult to compile, multiplied by Windows, and you're better off just not doing it if you can avoid it. Unfortunately ActiveState does not supply a PPM for it for licensing reasons nor do the other PPM repositories I looked through. Though its rumored that ActivePerl 5.10.0.1003 comes with DBD-Oracle.

If your Oracle server supports ODBC, you can talk to it using DBD::ODBC.

If you want to try, here are some special instructions for installing DBD::Oracle on Strawberry Perl which may be of help.

Strawberry Perl 5.20 (since May, 2014) ships with DBD::Oracle, as long as you install instantclient 11.x version it works out of the box. See http://strawberryperl.com/release-notes/5.20.0.1-64bit.html

Newly added DBD::Oracle - you have to install 64bit Oracle Instant Client 11.x and make sure you have OCI.DLL in your PATH

If you don't have all of the Oracle source (*.h, *.c) files, you can install DBD::Oracle via ppm, just like ActiveState. Or copy the library files from the ActiveState distribution.

David Mann

I documented what worked for me on Win32 here on my blog. Actually everything went smoothly except the DBI make process didn't detect my installed Oracle Client version correctly. A little deciphering of the make file and I saw there was a parameter to explicitly specify the version. I had to run the make and install commands manually but it all worked out.

I tried to use some pre-compiled modules but they were compiled with a specific version of Strawberry Perl in mind. I think I found a 5.12 compiled DBI for Oracle and it complained when I tried to use it with the latest 5.16 Strawberry Perl so that's why I went the manual build route.

From here on out I will probably just copy my c:\perl binary directory to other machines I need it, set environment variables and roll with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!