Re: Configuring Oracle TNS Stuff & perl

From: Dr. Blue <ou79138_at_deere.com>
Date: 1996/09/11
Message-ID: <3236E518.FC2_at_deere.com>#1/1


I had (have) the same problem. This is on a RS/6000 AIX 3.2 and Oracle 7.1.

I was told to user password_at_tns_name (you probably tried it) and it failed.

I ended up being convinced that there is some authorization problem such as the TNSNAMES.ORA file not being visible to the Web server.

My solution was to connect to the local database and then use links to get to the remote databases. In my case, this works fine as we have only a few apps on the Web and the queries are relatively simple so that they can execute efficiently using links.

To give more detail, I do something like this:

   $link = "_at_" || $in{'db'} if $in{'db'}; If no db is given, the the default is the local db.

and then

   $query = "select ... from customer$link";

Richard

Morgan D. Jones wrote:
>
> Hey all,
>
> I installed PERL5.003 and DBD & DBI stuff to access Oracle. This all
> works great when accessing ORACLE on the local machine, but when I try
> to access a remote machine I usually get:
>
> ERROR: ORA-12154: TNS:could not resolve service name
>
> What files do I need to modify (and how) to add a remote server, so the
> Oracle will know how to resolve the service name??
>
> So far the Monte Carlo method has not yielded much success.
> I'd appreciate any info ya'll might have out there.
>
> MDJ
> --
> Morgan D. Jones "Life is not for the faint-hearted!" - RN
> Mai Ki Kai
> BBN, Inc. 703/284-4791
  Received on Wed Sep 11 1996 - 00:00:00 CEST

Original text of this message