Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve service name while running a C# .NET app

Posted on 2006-06-22
6
Medium Priority
?
2,896 Views
Last Modified: 2008-02-20
I got this error"System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve service name" while trying to run a C# .NET application which is trying to connect to an Oracle database. The same app runs fine on my personal pc but does not on the test/production servers. Oracle client has been installed on the servers and I am able to connect to Oracle via SQL*Plus on those servers. Please help
0
Comment
Question by:julnewm
  • 3
6 Comments
 
LVL 12

Expert Comment

by:topdog770
ID: 16964886
It would appear that there isn't a system dsn or an oracle directory ( a tsnames ) file on the server.

On your laptop by what mechanism are you connecting to the server?
0
 
LVL 12

Expert Comment

by:topdog770
ID: 16964898
Ok.. after READING the question, let me revise this a bit..

how are you referring to the oracle database on your laptop and what's the connection string look like for your db?
0
 
LVL 12

Expert Comment

by:topdog770
ID: 16964934
Also when on the server, take a look at the sqlnet.log file, is it possibly a permissions issue, ie access to the tsnames.ora file or oracle directories?  
0
 

Author Comment

by:julnewm
ID: 16972248
I just figured it out what happened. The Production/Test servers are 64bit servers, and my app was installed under c:\program files (x86)\ so the app is having problem communicating with Oracle which was evident from connection error in my sqlnet.log file. I proceeded to remove the application from the server and re-install the app but this time directly under c:\ directory, and Aha!! my app is running and functioning as designed.

Thank you all.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17141519
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question