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,578 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert to Hour/minute textbox and compare 3 52
Turn on intranet settings 1 36
C# Single Form 8 26
Counting connections to SQL Server through C# 3 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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

937 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now