Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^3: Environmental Variables and DBD::Oracle

by valavanp (Curate)
on Sep 25, 2006 at 08:53 UTC ( #574702=note: print w/replies, xml ) Need Help??

in reply to Re^2: Environmental Variables and DBD::Oracle
in thread Environmental Variables and DBD::Oracle

Hi dhj, Please try this. I suggest you to give the environment variable for oracle home like below.
#!/usr/perl5/5.8.4/bin/perl -w BEGIN { use lib "Your DBD Oracle module installation path"; use DBI; use DBD::Oracle; $ENV{"ORACLE_HOME"} ='/local/src/local.perl/oracle/instantclient_10 +_ +2'; } my $host = ""; my $sid = "AAAA"; my $user = 'secret'; my $passwd = 'evenmoresecret'; my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passw +d) || print ("database connection not made"); $dbh->disconnect;</p>
The above code is not executed, but it works well in my server and module installation path.

Updated by Steve_p - added code tags

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://574702]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2016-10-25 06:49 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.