Geeks With Blogs

News


Saqib Ullah BootStrapper Know How

The following exception is very common type of exception for .net developer and oracle user.         
       
ORA-12154:TNS:could not resolve the connect identifier specified

Especially when you are using Oracle Data Provider for .Net and getting the above exception because of wrong connection string. So whenever you are using ODP you must following the connection string in the following pattern.

string connString = "user id=*****;password=*****;data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= IP Address or Host Name)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME= *****)));";              
oracleConnection1.ConnectionString = connString;  
oracleConnection1.Open();

Posted on Tuesday, March 13, 2012 10:51 PM .Net | Back to top


Comments on this post: ORA-12154:TNS:could not resolve the connect identifier specified

# re: Custom Visual Studio Visualizer
Requesting Gravatar...
coach outlet has always been simple,durable style features to win consumers.T
Left by [coach outlet] on Apr 13, 2012 2:27 PM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
still getting the same error.
My connection string is specified in web.config and I have accessed it through :
OracleConnection con = new OracleConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);

con.Open();

also, my i am accessing the Oracle database through Oracle Sql Developer.
Left by SK on May 28, 2012 5:00 PM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
I m also having the same problem. Have u got the solution
Left by ttt on Jun 21, 2012 3:54 PM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
I just happened to run into the same problem...thanks for the info.
Left by The Woodlands Texas on Jul 16, 2012 5:35 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
Thanks... that fixed my issue as well. Is this due in part if you have multiple Oracle homes and if you use a TNS entry it doesn't know what home to use?
Left by Pete on Sep 15, 2012 3:21 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
thank for these info. visit our web on http://www.trainingsemarang.com
please comment to improvement.
Left by training semarang on Jan 10, 2013 10:28 PM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
Thanks for the Tip, this helped me with my new project.
Left by Elisa on Jan 29, 2013 10:03 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
I currently have same issue here and will try your solution. Thanks
Left by Sandra on Feb 06, 2013 2:30 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
Thanks for your solution, it helped me a lot here.
Left by Jasmin on Feb 24, 2013 5:15 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
Thanks, my project is now working well after reading this blog.
Left by Sabrina on Apr 14, 2013 7:51 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
I finally found the issue with my identifier, thanks for your help.
Left by Maria on May 20, 2013 6:32 AM

# re: ORA-12154:TNS:could not resolve the connect identifier specified
Requesting Gravatar...
hi
thanks this post is very useful.its very his helped me with my new project.
thanks
Left by zia uddin on Mar 01, 2016 8:05 AM

Your comment:
 (will show your gravatar)


Copyright © Saqib Ullah | Powered by: GeeksWithBlogs.net