Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus behaviour clarification : "could not resolve service name"

Re: sqlplus behaviour clarification : "could not resolve service name"

From: samir <samirks_at_operamail.com>
Date: Thu, 10 Apr 2003 14:47:41 -0700
Message-ID: <3E95E67D.7070704@operamail.com>


Hi,

Thanks a lot for the reply. Sorry for not providing proper background of the problem. Here it is :

Our script connecting to database has following command :

sqlplus -s <username>/<passwd>@oracleDB @mysql.sql

Now, sometimes the above command returns the TNS error mentioned below but still prompts the user for username/password. Why TNS error comes is a different issue which we are looking into it as the same script works fine most of the time (problem can be due to network issues, not sure though).

So, just to reduce the confusion for the end user I was looking into the reason behind such behaviour of sqlplus and just wanted to make sure if we can disable this behaviour somehow. Now from your reply it is clear that we can't do so. In this case we have to look for other options.

Please do let me know if you have any other suggestion.

Thanks again for your reply.

regards,
samir

Sybrand Bakker wrote:
> On Thu, 10 Apr 2003 12:03:54 -0700, samir <samirks_at_operamail.com>
> wrote:
>
>

>>Hi,
>>
>>Even after throwing back following error :
>>
>>ORA-12154: TNS:could not resolve service name
>>
>>sqlplus prompts for username/password.
>>
>>Please let me know why it does so and is there a way to disable it. 
>>Basically, we don't want to prompt the user for username/password when 
>>sqlplus client fails to connect to database (we are invoking sqlplus 

>
>>from a shell script and providing a .sql file on the command line ).

>
>>Thanks and regards,
>>samir

>
>
> There is no way to disable it and you'd better resolve the real
> problem : an incorrect tnsnames.ora.
> Information about how to resolve it is flooding in the google
> archives, the question is asked over and over again by people who
> don't read manuals and don't search google before posting, and in the
> troubleshooting chapter of the net8 documentation.
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Thu Apr 10 2003 - 16:47:41 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US