Oracle Net can use a multi-level naming convention
for database servers that is not unlike that used on the internet.
Your entry for
in the tnsnames.ora file probably starts out like this:
" is significant. It represents the Oracle Net domain of the entry.
When you connect to the
service, you can specify this domain explicitly by using "
" as your service name,
or you can rely on the Oracle Net default domain and just use "
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:
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:
If you can tnsping successfully using a fully qualified service name (e.g. "coin.world"), but not when you depend on the default domain (e.g. "coin"), then you have an issue with the default domain.
You can change the default domain if you like, by editing the sqlnet.ora file, or you can decide to always use the fully qualified service name.