Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't connect to remote oracle db



Phil Buckley writes:

> 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.

Try this:

$dbh = DBI->connect("dbi:Oracle:host=$host", $user, $passwd,
                    { RaiseError =>1, AutoCommit => 1})
           || die "Unable to connect: $DBI::errstr";

Hope this helps,

--kevin
-- 
Kevin D. Clark          |                           |  Will hack Perl for
kclark at NOSPAM.ctron.com | kdcNOSPAM at .alumni.unh.edu | fine food, good beer, 
Cabletron Systems, Inc. | PGP Key Available         |      or fun.
Durham, N.H. (USA)      |                           |

-
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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org