I know there was a thread just 2 days back about this but I have slightly different problem with tnsnames.ora file.
I have a test server oracle816 here which has 8i database.
When I searched for tnsnames.ora file I found it in c:\oracle\ora81\network, c:\oracle\ora81\network\admin,
c:\orant\net80\admin, c:\orant\net80\tnsapi, c:\orant\network\admin.
This machine is NT machine.
I changed all these tnsnames.ora file on this server and on my machine workstation to read...
I am confused because using system/manager.. orcl81 to sql plus or sql worksheet or any other utility, I get error.
I can login from my workstation NT to this server NT. But when I try to log on from this server where this database is I get error saying TNS could not resolve service name.
But when I try to log in as system/manager and with blank service name on this server it works !!! Why it does not take that service name ? What's wrong ? which tnsnames.ora is it looking at ?
When you do not specify a service name (alias) Oracle assumes you mean the local instance specified by the ORACLE_SID value in the registry. Sambavan is correct, I would guess that Oracle816 is not the NT node name of the computer you are trying to connect to. Compare the local TNSNAMES.ORA file with one on a machine which does work. If that is the only alias in the TNSNAMES.ORA file, just copy one from a working machine.
I will be more specific this time...
Server where the database resides has machine name "oracle816" and that's the machine(server) where tnsnames.ora file has a problem. My machine is "sak" from which I can connect to this server without any problem.
I have copied tnsnames.ora file from machine(this part) on to the server(oracle816) where it does not work, but still it is not working. That's what confused me... What else should I lokk for where ?
That's why I specified locations of all tnsnames.ora file on that server(oracle816) where I copied this and still doesn't work. And wanted to know which one it is using.
first of all, Sqlnet would look for TNSNAMES.ORA at the oracle/ora81/network/admin by default.
your problem seems to me that your sqlnet.ora on your server NT does not have the entry "names.default_domain = world" since your connecting string did not include the ".world" but your tnsnames.ora does have this ("ora816.world") try "connect email@example.com", if this works, it is definitly the sqlnet.ora. Just add that entry or you will need that ".world" at the end of your connection string. Your workstation NT's sqlnet.ora must have that entry, go check it!