|Subject:||TNS: Could not resolve service name - What does this mean?|
|Creation date:||7/29/09 3:00 PM|
|Last modified on:||7/29/09 3:00 PM|
When trying to connect to Oracle the following error is generated:
ORA-12154: TNS:could not resolve service name
This error indicates that the service name specified in your ODBC DSN setup does not exist.
'TNS aliases' or 'service names' are defined locally to each
workstation. Thus different workstations could have a completely
different alias to refer to the same database.
Check what aliases or service names are defined
on the workstation and specify that value in the ODBC DSN. An invalid
or non-existent name will result in this error.
The following methods can be used to view existing TNS Service names on your machine:
- Look in the file 'ORANT\Network\Admin\Tnsnames.ora' (for versions
of Oracle prior to 8.1) or 'Oracle\Ora81\ Network\Admin\Tnsnames.ora'
(for versions of Oracle from 8.1 onwards). In this file each defined
name will normally have ".world" appended to it.
- For Oracle 8, run "Oracle Net8 Easy Config". This will list the available service names.
- For Oracle 7, run "SQL Net Easy Configuration". This provides the option to list the available service names.
- For Oracle 8.1 onwards: Try specifying the full service name, i.e. as it appears in the tnsnames file.
Posted by Richard Stanton on 4/29/11 10:16 AM
that tip worked for me too (although it kept trying to install to program files (x86) even though I specified another folder. Thanks!
Posted by Ed Giarrusso on 1/19/11 10:18 AM
We had this problem after completing a default on a 2008 x64 server.
ODBC connectivity test passed but WinSQL would fail to connect using the same ODBC.
To resolve this problem I uninstalled and reinstalled to a folder that did not have the (x86) in the path.
Add a comment to this document
Do you have a helpful tip related to this document that you'd like to share
with other users? Please add it below. Your name and tip will appear at the
end of the document text.