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
2,666 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PrintingFoundIt(Almost!(Damn!)) 1 37
C# MVC Insert Multiple Row into DB 2 61
Please explain purpose of GZIP 4 56
Header Font Size in Grid View 6 23
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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