Perl to Oracle Proxy


This little tool/tip explains how to access an Oracle 8i database from a Perl script running on NetWare 6. Since no native driver is available for netware, the best solution is to use DBD::JDBC for Perl (

This module works well on NetWare, in conjunction with Oracle's Thin JDBC driver.

To get the Oracle connection up 'n' running, unzip the file to the sys volume. It contains the module and the module needed by

The zip file also contains a jdbc folder with the neccessary files for the jdbc-perl proxy.

Download the Oracle Thin JDBC driver ( from Oracle ( and put it in the jdbc folder. Then start the proxy by typing "load sys:jdbc/server.ncf" on the console. This can also be added to autoexec.ncf, to start the proxy when the server boots.

When the proxy is running, you can access Oracle from Perl by using DBI to connect to localhost:9001:

use DBI;

my $usrname = '...';
my $passwd = '...';
my $url = '...';

my $connection =
DBI->connect("dbi:JDBC:hostname=localhost:9001;url=$url",$usrname,$passwd)or die "Could not connect!\n";

In the code above, $usrname and $passwd must be a valid Oracle user, and $url must be a valid JDBC connection url.

The above example should also work for other JDBC capable databases, by placing their drivers in sys:jdbc/ and adding them to the class path given in sys:jdbc/server.


Comment List
Related Discussions