The DBD::Oracle documentation states that if your database resides on the same machine as your Perl code, then you can use a local IPC connector rather than TCP. My initial thought to this is that local IPC should be quicker.
The DBD::Oracle docs, however, do not cover Oracle 9i which is what I am using. The connection methods stated in the DBD::Oracle docs produce the error
DBI connect('','user',...) failed: ORA-06401: NETCMN: invalid driver designator (DBD ERROR: OCIServerAttach) when I try running:
#!/usr/local/bin/perl
BEGIN {
$ENV{ORACLE_HOME} = '/app/oracle/product/9.0.1';
$ENV{TWO_TASK} = 'P:mydb';
}
use DBI;
$dbh = DBI->connect('dbi:Oracle:', 'user', 'pass') || die $!;
$dbh->do("select 1 from dual");
$dbh->disconnect;
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).