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

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 = "bo.boo.com"; 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


Comment on Re^3: Environmental Variables and DBD::Oracle
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2015-07-01 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (22 votes), past polls