Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3107
  • Last Modified:

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

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
julnewm
Asked:
julnewm
  • 3
1 Solution
 
topdog770Commented:
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
 
topdog770Commented:
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
 
topdog770Commented:
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
 
julnewmAuthor Commented:
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
 
CetusMODCommented:
PAQed with points refunded (500)

CetusMOD
Community Support Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now