Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: (untagged)
The following Error Occured while Connecting to Database.
"ORA-12154 :TNS:Could not resolve the connect identifier specified".
Plz Give Me Solution to solve this error.
Posted 10-Feb-10 1:21am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Ever heard of google?
 
http://ora-12154.ora-code.com/[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

I am assuming that you have all the correct configurations in tnanames.ora and still you are not able to connect, you add the connection string in web.config as below
 

 
* The above method will definitely work if you are able to connect to your Oracle database using Oracle Net Configuration.
  Permalink  
Comments
ThePhantomUpvoter at 18-Sep-13 13:16pm
   
Do you really think that the OP is still waiting for an answer after 3 years?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This is an Oracle error rather than a .NET error. Check your TNSNames.ora file.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

The connect identifier which you are using is not available in your tnsnames.ora file. You need to edit this file and add proper details.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

SYMPTOM
Receive the error message, "ORA-12154 TNS: could not resolve the connect identifier specified."
 
CAUSE
A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured.
 
For example, if the type of connect identifier used was a net service name, then the net service name could not be found in a naming method repository, or the repository could not be located or reached.
 
RESOLUTION
If you are using local naming (TNSNAMES.ORA file)
 
1. Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
 
2. Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
 
3. Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
 
4. Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
 
If you are using directory naming
 
1. Verify that "LDAP" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
 
2. Verify that the LDAP directory server is up and that it is accessible.
 
3. Verify that the net service name or database name used as the connect identifier is configured in the directory.
 
4. Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier
 
If you are using easy connect naming
 
1. Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
 
2. Make sure the host, port, and service name specified are correct.
 
3. Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.
  Permalink  
Comments
Marcus Kramer at 24-Jan-12 9:42am
   
This question is almost 2 years old. Please don't reopen old questions like this by answering them now.
Brijesh Kr at 18-Sep-13 12:37pm
   
Dear Marcus,
why not, if some one recently joins and he/she knows the answer then why you having problem in this. Rather, it's good to see somebody have an answer.
ThePhantomUpvoter at 18-Sep-13 13:17pm
   
Someone already did have an answer.... 3 years ago.... There is no real reason to keep answering questions over and over that provide no real value.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 18 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100