Strawberry Perl + DBD::Oracle for MS Windows...
While helping a developer at my company get up and running with some DBI/DBD stuff I came across the Open Source Strawberry Perl distribution for Windows. It is an all-in-one package of Perl interpreter and many common packages required to get productive. Hopefully gone are the days of struggling to find a DBD driver compiled for Windows... From the website:
They offer 32/64 bit distribution packages in multiple forms including a tidy .MSI installer if you have admin privileges or a self contained ZIP edition that does not require admin privileges - just drop it in a directory and go.
They also offer a set of files that you can use to build your own custom Strawberry Perl install packages - probably good if you are developing a packaged application.
1) Download and extract Strawberry Perl ZIP Edition to c:\perl
2) Download and extract oracle instant client files to c:\perl\instantclient_11_2. I downloaded the Win32 InstantClient, the SQLPlus, and the SDK packages from the Instant Client Download Page
3) Create c:\perl\instantclient_11_2\network\admin, copy tnsnames.ora, ldap.ora, sqlnet.ora there
4) Install Oracle::DBD, open a cmd.exe window and:
c: cd \perl relocation.pl.bat update_env.pl.batAfter this step you must exist your cmd.exe window and start it again for the Perl related environment variables to take effect.
c: cd \perl REM At this point c:\perl\perl\bin should be available, this should result in a version banner: perl -v SET ORACLE_HOME=c:\perl\instantclient_11_2 SET LD_LIBRARY_PATH=c:\perl\instantclient_11_2 SET TNS_ADMIN=c:\perl\instantclient_11_2\network\admin SET NLS_LANG=American_America.UTF8 SET PATH=%PATH%;c:\perl\instantclient_11_2 REM A more isolated version of a PATH I used for testing when I had multiple clients installed: REM SET PATH=C:\perl\perl\site\bin;C:\perl\perl\bin;;C:\perl\c\bin;C:\perl\perl\site\bin;C:\perl\perl\bin;c:\perl\instantclient_11_2; REM Run CPAN and execute some cpan commands: CPAN get DBD::Oracle look DBD::Oracle perl Makefile.pl -V 11.2 dmake dmake test dmake install exit exit REM Using the test script below, make sure you can invoke DBI and talk to an Oracle database perl test.pl scott tiger orcl out.txtOnce you are done and run a test script (like this one here) to test connectivity you should be good to go. Make sure you permanently set the SET parameters above permanently in your environment. You can either incorporate them into a batch file before every program run or set them permanently in Windows via the Manage -> Environment Variables screen.