Oracle到VB.net的连接问题 [英] Oracle to VB.net connection problem

查看:71
本文介绍了Oracle到VB.net的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用vs 2010和.net framework 4.0创建了一个应用程序

它可以与localhost一起使用。但是当exe项目在本地网络系统下运行时会发生错误。



错误是





ORA-12541:TNS:没有听众











以下显示详细信息



我的app.cofig文件连接字符串是



I have created an application with vs 2010 and .net framework 4.0
it works fine with localhost. but error occurs when , exe project runs under a local network system.

error is


ORA-12541: TNS:no listener





below show the details

My app.cofig file connection string is

connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Ipadressofmysystem)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));
User Id=system;Password=admin1234;"/>







Tnsname.ora文件包含





#tnsnames.ora网络配置文件:C:\ app\Administrator\product\11.2.0\ dbhome_1\\\
etwork\admin \tnsnames.ora

#由Oracle配置工具生成。



LISTENER_OR CL =

(ADDRESS =(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))





ORACLR_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS =(PROTOCOL = IPC)(KEY = EXTPROC1521))< br $>


(CONNECT_DATA =

(SID = CLRExtProc)

(演示= RO)







ORCL =

(DESCRIPTION =

(ADDRESS =(PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)







请帮我解决问题...作为我对oracle数据库的新手。

感谢你




Tnsname.ora file contains


# tnsnames.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)

Please help me out for the solution... as im new to oracle database.
Thanking you

推荐答案

具体问题是localhost只会访问计算机上的服务器实例正在运行试图访问的软件D B。这在开发中工作得很好,当你的开发盒加载了Oracle时,但是在生产中你需要连接到一个正确的实例。



试试看这里:< a href =http://www.connectionstrings.com/oracle/> http://www.connectionstrings.com/oracle/ [ ^ ]它可以帮助您确定连接详细信息中需要的内容。
The specific problem is that "localhost" will only access server instances on the computer that is running the software that tries to access the DB. That works fine in development, when Oracle is loaded on your dev box, but in production you need to connect to a "proper" instance.

Try looking here: http://www.connectionstrings.com/oracle/[^] it may help you decide what you need to have in your connection details.


这篇关于Oracle到VB.net的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆