On Fri, 14 Jan 2011 15:21:39 +0000, "Martin J. Evans" <martin.ev...@easysoft.com> wrote:
> On 14/01/11 15:01, H.Merijn Brand wrote: > > On Fri, 14 Jan 2011 14:56:46 +0000, "Martin J. Evans" > > <martin.ev...@easysoft.com> wrote: > > > >> On 14/01/11 14:30, H.Merijn Brand wrote: > >>> Maybe this is a feature request, but if I have > >>> > >>> ORACLE_USERID=john/sekrit > >>> DBI_USER=pablo > >>> DBI_PASS=neruda > >>> > >>> I *do* expect that DBD::Oracle uses DBI_USER and DBI_PASS *instead of* > >>> the ORACLE_USERID. Anyone can come up with a good reason why this os > >>> not happening at the moment? > >>> > >>> How do other DBD's set precedence if environment variable are allowed > >>> for login credentials? > >>> > >> > >> Just a minor point (not saying it stops the discussion) but I don't > >> think ORACLE_USERID is something DBD::Oracle defines (other than in > >> test code in t/*). So is your point to do with running tests in t/* or > >> in general? > > > > I ran into this in the test suite indeed. Your findings below just > > confirm my expectation :) > > > > I posted it here because I saw no generic docs about this > > It is in the README. Yes, the *DBD::Oracle* README. I know, I found it there, but I was more looking for guides from DBI. Does DBI document that DBU_USER/DBI_PASS would somehow overrule other (default) settings? I think the DBD::Oracle README does exactly what it said. So it is not wrong. > The supplied tests will connect to the database using the value of the > ORACLE_USERID environment variable to supply the username/password. > > Don't know why it cannot fall back on DBI_USER/DBI_PASS. > > >> $ export ORACLE_USERID=wrong/wrong > >> $ export DBI_USER=real_user > >> $ export DBI_PASS=valid_password > >> $ export DBI_DSN='dbi:Oracle:host=betoracle.easysoft.local;sid=devel' > >> $ perl -le 'use DBI; my $h = DBI->connect();' > >> > >> works for me. i.e., ORACLE_USERID contains invalid username/password > >> and DBI_USER/DBI_PASS contain valid username/password and it connects > >> fine. > >> > >> Perhaps I misunderstood you Merijn. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/