[thelist] Perl DBI and Oracle

Simon Batistoni simon at ukpropertyshop.com
Fri May 26 05:06:17 2000


A bit difficult without slightly more knowledge about your setup, but:

1) Have you installed the DBD driver for Oracle on your machine? DBI is the
interface *you* use in Perl, but perl also needs another module in its
memory to convert your DBI commands to Oracle-specific commands. In this
case, it's called DBD:Oracle, and is available from CPAN
(http://search.cpan.org/search?dist=DBD-Oracle)

2) I believe the format for cross-lan connection would be:

$db = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passwd) or
print "$DBI::errstr\n";

This should get you connected to the server, or give you a reasonable error
message from DBI if there's a problem.

Username and password should be present, whatever. If you don't need one to
connect to Oracle (in which case, who's in charge of security in your
joint?!), supply them with (unquoted) undef values.

There's a lot more at:

http://search.cpan.org/doc/TIMB/DBD-Oracle-1.03/Oracle.pm

HTH

sb

> -----Original Message-----
> From: thelist-admin@lists.evolt.org
> [mailto:thelist-admin@lists.evolt.org]On Behalf Of Jonathan Lim
> Sent: 26 May 2000 09:32
> To: thelist@lists.evolt.org
> Subject: [thelist] Perl DBI and Oracle
>
>
> Hi,
>
> Can anyone give me any hints on getting my Linux box to talk to
> an Oracle DB
> over a LAN?
>
> I am trying to use the Perl DBI, but I'm having problems connect. I would
> like to avoid installing a local Oracle server.
>
> I suspect that I need SQLNet installed, but no luck in finding that.
>
> All help and suggestions would be appreciated.
>
> Thanks.
> Jon
>
> --
> Jonathan Lim	jonathan.lim@netdecisions.co.uk
> Netdecisions	http://www.netdecisions.co.uk/
> TFR	http://www.thefirstresort.com/
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>