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: 23812
Status: rejected
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: rkitover [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.19
Fixed in: (no value)



Subject: DBD::Oracle on Cygwin ignores $ENV{TNS_ADMIN} in connect
I'm using Oracle 10g on Windows XP with Cygwin. Doing: perl -MDBD::Oracle -le 'DBI->connect("dbi:Oracle:XXX","XXX/XXX")' Gives: DBI connect('XXX','XXX/XXX',...) failed: ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach) at -e line 1 However, if I do: cp $TNS_ADMIN/tnsnames.ora /cygdrive/c/oracle/product/10.2.0/db_1/NETWORK/ADMIN/ perl -MDBD::Oracle -le 'DBI->connect("dbi:Oracle:XXX","XXX/XXX")' Then everything works fine. Also, perl -le 'use DBD::Oracle; print join "\n",DBI->data_sources("Oracle")' Reads tnsnames.ora correctly from $ENV{TNS_ADMIN}. The DBD-Oracle package for ActiveState Perl does not display this behavior, and connects correctly using TNS_ADMIN. -- Rafael
This could be a local install error of some sort. It is a simple pearl code that is findingout the TNS data and it works for almost every other system out there. I do have some questions for you? 1) what is the version of DBD you are using from active state 2) what is the version of DBD you are getting the error on. cheers John S
Subject: Re: [rt.cpan.org #23812] DBD::Oracle on Cygwin ignores $ENV{TNS_ADMIN} in connect
Date: Wed, 13 Dec 2006 17:22:46 -0800
To: bug-DBD-Oracle [...] rt.cpan.org
From: Rafael Kitover <caelum [...] debian.org>
via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=23812 > > > This could be a local install error of some sort. It is a simple > pearl code that is findingout the TNS data and it works for almost > every other system out there.
The problem is that it reads the TNS data only for Show quoted text
> > I do have some questions for you? > > 1) what is the version of DBD you are using from active state > 2) what is the version of DBD you are getting the error on. > > cheers > > John S
Hi John, On Cygwin: perl -MDBD::Oracle -le 'print "DBD: $DBD::Oracle::VERSION\tDBI: $DBI::VERSION"' DBD: 1.19 DBI: 1.52 On ActiveState: /cygdrive/c/perl/bin/perl -MDBD::Oracle -le 'print "DBD: $DBD::Oracle::VERSION\tDBI: $DBI::VERSION"' DBD: 1.17 DBI: 1.53 The command: perl -le 'use DBD::Oracle; print join "\n",DBI->data_sources("Oracle")' Actually calls load_dbnames, which reads the tnsnames.ora file, from the location in TNS_ADMIN if available. The connect is a call to OCIServerAttach or something like that, which for some reason under Cygwin doesn't... I could maybe retrofit load_dbnames to also load the TNS connection information and in the case of Cygwin to use that information instead of just trying to connect to the sid, or something... Or maybe the OCI libraries are just confused under Cygwin and this should happen automatically, I have no idea. -- Rafael
On Wed Dec 13 20:23:09 2006, caelum@debian.org wrote: Show quoted text
> via RT wrote:
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=23812 > > > > > This could be a local install error of some sort. It is a simple > > pearl code that is findingout the TNS data and it works for almost > > every other system out there.
> > The problem is that it reads the TNS data only for >
> > > > I do have some questions for you? > > > > 1) what is the version of DBD you are using from active state > > 2) what is the version of DBD you are getting the error on. > > > > cheers > > > > John S
> > Hi John, > > On Cygwin: > perl -MDBD::Oracle -le 'print "DBD: $DBD::Oracle::VERSION\tDBI: > $DBI::VERSION"' > DBD: 1.19 DBI: 1.52 > > On ActiveState: > /cygdrive/c/perl/bin/perl -MDBD::Oracle -le 'print "DBD: > $DBD::Oracle::VERSION\tDBI: $DBI::VERSION"' > DBD: 1.17 DBI: 1.53 > > The command: > perl -le 'use DBD::Oracle; print join "\n",DBI->data_sources("Oracle")' > > Actually calls load_dbnames, which reads the tnsnames.ora file, from the > location in TNS_ADMIN if available. > > The connect is a call to OCIServerAttach or something like that, which > for some reason under Cygwin doesn't... > > I could maybe retrofit load_dbnames to also load the TNS connection > information and in the case of Cygwin to use that information instead of > just trying to connect to the sid, or something... > > Or maybe the OCI libraries are just confused under Cygwin and this > should happen automatically, I have no idea. >
Rafael and I chatted on irc. No one is suggesting you can now install DBD::Oracle on Cygwin but on the other hand we don't really know. Neither of us are going to look at this now and this issue is 6 years old. I'll happily reopen if we either get time or the inclination to try this again and find it does not work. I only have options for delete, resolve or reject and it is only resolved in the fact we are not going to do anything so I set reject. Martin -- Martin J. Evans Wetherby, UK