Ora 12154错误 [英] Ora 12154 error
问题描述
我最近在我的一个开发服务器中部署了一个Web应用程序。我使用的是oracle,asp.net和c#。当我在服务器上运行应用程序一切正常,但是当我尝试运行应用程序外的服务器(使用我的电脑,例如)我得到这个错误:
I recently deploy one web application in one of my development servers. I'm using oracle, asp.net and c#. When I run the application in the server everything works fine, but when I try to run the application outside of the server (using my pc, for example) i get this error:
ORA-12154: TNS:could not resolve the connect identifier specified
If i run the application in my pc with visual studio it works fine.
Oracle安装在服务器A中,应用程序在服务器B 。服务器A在一个域中,服务器B在其他域中。我的电脑在同一个域中有服务器A。
Oracle is installed in Server "A" and the application is in server "B". Server "A" is in one domain and server "B" is in other domain.My pc is in the same domain has Server "A".
可以在C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN中找到文件tnsname.ora,但是在服务器B中我不能在任何位置找到它。
In my pc I can find the file tnsname.ora in C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN, but in Server "B" i can´t find it anywhere
任何想法?
感谢您的帮助。
any idea? Thanks for the help.
推荐答案
猜测:服务器B上未安装oracle客户端。
Guess: An oracle client is not installed on Server B.
如果您安装了oracle客户端,那么您仍然可以在任何位置(例如网络共享上的目录)放置tnsnames文件。为此,请将TNS_ADMIN系统变量(XP上的系统属性 - >高级 - >环境变量)设置为包含您的tnsnames文件的目录。
If you do have an oracle client installed then you can still put a tnsnames file in any location (Such as a directory on a network share). In order to do this, set a TNS_ADMIN system variable (System Properties->Advanced->Environment Variables on XP) to the directory containing your tnsnames files.
示例我有一个系统变量:TNS_ADMIN - C:\oracle\ora92\\\
etwork\ADMIN
For me for example I have a system variable: TNS_ADMIN - C:\oracle\ora92\network\ADMIN
这篇关于Ora 12154错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!