Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus behaviour clarification : "could not resolve service name"
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
![]() |
![]() |