WinSQL » Knowledge base
Document information
Document ID: | 770 |
---|
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 |
---|
Document Details
When trying to connect to Oracle the following error is generated:
ORA-12154: TNS:could not resolve service name
Cause
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.
Solution
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.
User comments
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.
Ed Giarrusso
Network Administrator
The TImes-Picayune
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 Prince on 3/8/16 6:20 AM
Hi Friend
I have successfully installed Oracle 11g but now i have facing error which is
error:
ORA-12154: TNS: could not resolve service name
Plz give me solution
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?
Important: This area is reserved for useful tips. Therefore, do not post any questions here. Instead, use our
public forums to post questions.