ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> modperl
modperl
Connecting to more than one oracle database
by Malka Cymbalista other posts by this author
Nov 29 2006 12:28AM messages near this date
[ANNOUNCE] mod_perl 2.0.3 | RE: Connecting to more than one oracle database
I am running Apache 2.0.55 with mod_perl 2.0.1 and Perl 5.8.1 on a Sun
Solaris machine. I am using DBI/DBD to connect to an Oracle database.  I
am running DBI 1.39 and DBD-Oracle 1.16. 
 
In order to connect to an oracle database on a different machine I have
a tnsnames.ora file with the appropriate definition. I also have a file
startup.pl with the following information:
$ENV{ORACLE_HOME} = '/usr/local/ora9i/9.2.0';
$ENV{ORACLE_SID} = 'asdb';
$ENV{TWO_TASK} = 'asdb';
$ENV{TNS_ADMIN} = '/usr/local/ora9i/9.2.0/network/admin/DEV_wiccdb';
In httpd.conf I have the line
PerlRequire "/www/httpd/conf/startup.pl"
 
I am currently connecting to an oracle database on a different machine
and everything is working fine.  I would now like to connect to another
oracle database on another machine.  My problem is how to define my
environment variables.  ORACLE_HOME and TNS_ADMIN do not seem to be a
problem since I assume they can be the same.  However, how do I define
ORACLE_SID and TWO_TASK so that they allow connecting to 2 different
databases on 2 different machines?
 
Thanks for any help.
 
 
Malka Cymbalista
Webmaster, Weizmann Institute of Science
malki.cymbalista@[...].il 
08-934-3036
Thread:
Malka Cymbalista
Ray Barksdale
Jeffrey Seger

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved