Oracle Net can use a
multi-level naming convention for database servers that is not unlike that used on the internet.
Your entry for
COIN
in the tnsnames.ora file probably starts out like this:
COIN.WORLD =
The "
.WORLD
" is significant. It represents the Oracle Net domain of the entry. When you connect to the
COIN
service, you can specify this domain explicitly by using "
coin.world
" as your service name, or you can rely on the Oracle Net default domain and just use "
COIN
." The default domain is defined in a file named sqlnet.ora, which is found in the same directory as the tnsnames.ora file. The line in the sqlnet.ora file that defines the default domain looks like this:
names.default_domain = world
In the example above, the default domain of "world" matches the domain of "world" in "coin.world".
Consequently, you may simply refer to the service as "coin". However, let's consider what would happen if your default domain entry looked like this (someone would have to have changed it for it to look like this):
names.default_domain = notworld
Now the domains do not match. The default domain is "notworld", and if you tried to connect to a service named
"coin", Oracle Net would append ".notworld" onto the end and try to connect you to "coin.notworld".
Since "coin.notworld" does not exist in your tnsnames.ora file, you would get an error like that shown in this example:
C:\>tnsping coin
TNS Ping Utility for 32-bit Windows:
Version 8.1.5.0.0 - Production on 16-MAY-99
14:08:08
(c) Copyright 1997 Oracle Corporation.
All rights reserved.
TNS-03505: Failed to resolve name
Default domain mismatches like this are very easy to diagnose. All you have to do is to tnsping the server and specify the fully qualified service name when you do. For example: