Re: Windows 2K - ORA-12154

From: Rob Mascaro <rmascaro_at_scnet.com.au>
Date: 2 Sep 2002 09:31:36 -0700
Message-ID: <7726887a.0209020831.2e1f86b4_at_posting.google.com>


NTollner_at_engr.uky.edu wrote in message news:<ako0bd$frt$1_at_news.uky.edu>...
> I have a user with an application that works correctly when user has
> Win2K admin rights but receives
> a connection error ORA-12154 without admin rights. How can this be
> resolved without granting
> admin rights to a user.
>
> Thanks in advance

An ora-12154 almost always indicates that either the tnsnames entry in the tnsnames file could not be found, or that the tnsnames.ora could not be found. I suspect the latter is occuring. On most platforms, including NT, the search order of the tnsnames goes something like this:

1. .tnsnames.ora (unix only - current directory)
2. Current env $ORACLE_HOME (NT, Unix)
3. $TNS_ADMIN (or TNS_ADMIN in the NT registry)
note: you can set these on the command line in NT too! ie. set TNS_ADMIN=... The third point is the most trickiest on NT. Most of Oracle's older exe's will read the topmost registry key ie. LOCAL_MACHINE/SOFTWARE/ORACLE and look for the TNS_ADMIN = "network dir" in there. However most of the new exe's are multi-home aware and will look further under the appropriate
LOCAL_MACHINE/SOFTWARE/ORACLE/HOMEX for the exe.

My trick is to set all of them ie. TNS_ADMIN=.... for all Oracle reg keys, once this is done you should always be reading the right tnsnames.ora
Hope this helps. Received on Mon Sep 02 2002 - 18:31:36 CEST

Original text of this message