Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 67942
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: jay.senseman [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.29_1



Subject: /etc/tnsnames.ora not being read, needs to be added to search path
Date: Wed, 4 May 2011 11:05:25 -0400
To: bug-DBD-Oracle [...] rt.cpan.org
From: Jay Senseman <jay.senseman [...] gmail.com>
Download (untitled) / with headers
text/plain 1.3k
Currently, if /etc/tnsnames.ora exists on a server, DBD::Oracle (1.28) will not pull the path in and read the file. sqlplus appears to allow /etc as a valid path for tnsnames.ora and I have confirmed that sqlplus will check for and read /etc/tnsnames.ora on the 11.2 instantclient on RHEL6. I have not been able to find exact docs to confirm the locations is a valid path, but I have found references to it in various places within oracle proper: http://asktom.oracle.com/pls/apex/f?p=100:11:0::NO::P11_QUESTION_ID:1281675938015 http://wiki.oracle.com/page/SQL+Developer+FAQ "for HP and Digital machines these files [tnsnames.ora] are found in /etc/ area by default." Here's a quick one-line patch to add it to the search path: --- Oracle.pm 2011-05-03 21:01:10.000000000 +0000 +++ Oracle.pm.patch 2011-05-04 14:37:14.000000000 +0000 @@ -147,6 +147,7 @@ "$oracle_home/net80/admin", # OCI 8.0 ) if $oracle_home; push @tns_admin, "/var/opt/oracle"; + push @tns_admin, "/etc"; foreach $d ( DBD::Oracle::ora_env_var("TNS_ADMIN"), ".", @tns_admin ) { next unless $d && open(FH, "<$d/tnsnames.ora"); $drh->trace_msg("Loading $d/tnsnames.ora\n") if $debug; I would appreciate it if this could get added into the next release, as currently I'm using a symlink /var/opt/oracle -> /etc as my workaround.
Download (untitled) / with headers
text/plain 1.5k
On Wed May 04 11:05:35 2011, jay.senseman@gmail.com wrote: Show quoted text
> Currently, if /etc/tnsnames.ora exists on a server, DBD::Oracle (1.28) > will > not pull the path in and read the file. > > sqlplus appears to allow /etc as a valid path for tnsnames.ora and I > have confirmed that sqlplus will check for and read /etc/tnsnames.ora > on the 11.2 instantclient on RHEL6. I have not been able to find exact > docs to > confirm the locations is a valid path, but I have found references to > it in various places within oracle proper: > > http://asktom.oracle.com/pls/apex/f?
p=100:11:0::NO::P11_QUESTION_ID:1281675938015 Show quoted text
> http://wiki.oracle.com/page/SQL+Developer+FAQ > > "for HP and Digital machines these files [tnsnames.ora] are found in > /etc/ area by default." > > Here's a quick one-line patch to add it to the search path: > > > --- Oracle.pm 2011-05-03 21:01:10.000000000 +0000 > +++ Oracle.pm.patch 2011-05-04 14:37:14.000000000 +0000 > @@ -147,6 +147,7 @@ > "$oracle_home/net80/admin", # OCI 8.0 > ) if $oracle_home; > push @tns_admin, "/var/opt/oracle"; > + push @tns_admin, "/etc"; > foreach $d ( DBD::Oracle::ora_env_var("TNS_ADMIN"), ".", > @tns_admin ) { > next unless $d && open(FH, "<$d/tnsnames.ora"); > $drh->trace_msg("Loading $d/tnsnames.ora\n") if $debug; > > > > I would appreciate it if this could get added into the next release, > as currently I'm using a symlink /var/opt/oracle -> /etc as my > workaround.
Applied to subversion trunk and should be in the next development release 1.29_1. Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.