Can't connect to remote oracle db
Scott Lanning
slanning at buphy.bu.edu
Wed Mar 22 18:52:09 EST 2000
On Tue, 21 Mar 2000, Phil Buckley wrote:
>Does anyone have any experience using perl/DBI to connect to a
>remote Oracle db?
>
>I'm getting much to frustrated with what I suspected would be a
>simple routine.
>
>All I really need is the ...
>
>$dbh = DBI->connect("dbi:Oracle:$dbname", $user, $passwd, {
>RaiseError =>1, AutoCommit => 1}) || die "Unable to
>connect: $DBI::errstr";
>
>Where do I put in the host in the scenario <aargh> too late, I'll
>look for answers in the morning.
(I'm only familiar with MySQL.)
In 'perldoc DBI', it says:
-----
Examples of $data_source values:
dbi:DriverName:database_name
dbi:DriverName:database_name at hostname:port
dbi:DriverName:database=database_name;host=hostname;port=port
There is no standard for the text following the driver
name. Each driver is free to use whatever syntax it
wants. The only requirement the DBI makes is that all
the information is supplied in a single string. You
must consult the documentation for the drivers you are
using for a description of the syntax they require.
-----
The documentation for your driver will be in
'perldoc DBD::drivername'; for example, for me, it's
in 'perldoc DBD::mysql'.
I don't know if that helped any..
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).
More information about the Discuss
mailing list