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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Connection String to remote Server not working 3 57
WPF issue with Trigger 2 68
Expando 4 34
String manipulation 15 49
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

21 Experts available now in Live!

Get 1:1 Help Now