Thanks Jeffrey but:
- the tnsname.ora is OK as tnsping works fine as well as the same script run
from the command line.
- the case is only important for Oracle in the string dbi:Oracle:SID
(the line in startup.pl in commented it was just a previous try)
I'm really running out of idea about this problem. I never had any problem
with DBI
in other command line perl scripts as well as in traditionnal perl CGI
scripts so I
think there is something linked to Registry ???
Regards
Jerome
At 10:33 AM 29-03-00 -0800, Jeffrey W. Baker wrote:
>On Wed, 29 Mar 2000, Jerome MOUREAUX wrote:
>
> > Hi All,
> >
> > I experience a trouble with Perl script using DBI running under Mod_perl
> > and Registry
> > If you have an idea from where the problem may come....
> >
> > Here is the error :
> >
> > DBI->connect failed: ORA-12154: TNS:could not resolve service name (DBD:
> > login f
> > ailed) at /disc1/sherpa_a/indicators2/perl/activity/toto.pl line 5
> > [Wed Mar 29 20:11:32 2000] [error] ORA-12154: TNS:could not resolve
> service
> > name
> > (DBD: login failed) at /disc1/sherpa_a/indicators2/perl/activity/toto.pl
> > line 5
>
> > #Apache::DBI->connect_on_init("dbi:Oracle:indicators", "indic", "xxxx",
> ^^^^^^^^^^
>
> > my $dbh = DBI->connect( 'DBI:Oracle:INDICATORS', 'indic', xxxx',
> ^^^^^^^^^^
>
>
>Well, which is it? indicators or INDICATORS? Case may be important, use
>the same case as the service name definition in tnsnames.ora.
>
>-jwb