简体   繁体   English

用寡妇创建一个Oracle ODBC DSN。 输入端口号

[英]Create a Oracle ODBC DSN with Widows. Entering the port number

I have the following entry in my c:\\Oracle\\product\\11.1.0\\network\\ADMIN\\TNSNAMES.ORA file. 我的c:\\ Oracle \\ product \\ 11.1.0 \\ network \\ ADMIN \\ TNSNAMES.ORA文件中包含以下条目。

enter code here pvtest.world = enter code here pvtest.world =

(DESCRIPTION = (说明=

(ADDRESS_LIST =

  (ADDRESS = (PROTOCOL = TCP)(HOST = xxxx.xxx.xxx)(PORT = 1521))

)

(CONNECT_DATA =

  (SID = pvtest)

  (SERVER = DEDICATED)

)

)

I could connect successfully using TOAD. 我可以使用TOAD成功连接。 Now when I try creating a new ODBC DSN it doesn't allow me to do so. 现在,当我尝试创建新的ODBC DSN时,不允许这样做。 How do I specify the port number in TNS Service Name? 如何在TNS服务名称中指定端口号?

enter code here Get the following error : --------------------------- enter code here出现以下错误:---------------------------

Testing Connection 测试连接

Unable to connect SQLState=S1000 [Oracle][ODBC][Ora]ORA-12514: TNS:listener does not currently know of service requested in connect descriptor 无法连接SQLState = S1000 [Oracle] [ODBC] [Ora] ORA-12514:TNS:listener当前不知道连接描述符中请求的服务


OK

When you say you could connect with TOAD, can you do so now that the ODBC connection fails? 当您说可以与TOAD连接时,由于ODBC连接失败,您现在可以这样做吗? if you can connect with any tool on your client PC than obviously the listener at the other end knows of the service so you have to suspect your end. 如果您可以连接客户端PC上的任何工具,显然另一端的侦听器知道该服务,那么您就不得不怀疑这一端。 Probably one client tool is trying to reach PVTEST at a diffrerent location than the other. 一个客户端工具可能正试图在另一个位置上到达PVTEST。

If one client tool can connect and the other cannot, first of I would confirm that both clients are using the same tnsnames.ora file. 如果一个客户端工具可以连接而另一个无法连接,则首先我要确认两个客户端都使用相同的tnsnames.ora文件。 Search your client and see if there are other tnsnames.ora files which would imply other ORACLE_HOMES (Google that if you don't know what it is). 搜索您的客户端,看看是否还有其他tnsnames.ora文件暗示着其他ORACLE_HOMES(如果您不知道这是什么,请使用Google)。

From a command line do a TNSPING and see if it reaches the host. 从命令行执行TNSPING,然后查看它是否到达主机。 It will also tell about the connection details. 它还会告诉您有关连接的详细信息。

In TOAD check the connection details and ensure it is using a tnsnames connection and if so which tnsnames. 在TOAD中,检查连接详细信息,并确保它使用的是tnsnames连接,如果是,则使用哪个tnsnames。

Check if your client has the environment variable TNS_ADMIN set. 检查您的客户端是否设置了环境变量TNS_ADMIN。

I have this kind of block with Oracle XE: 我对Oracle XE有这样的障碍:

XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test.acme.org)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) XE =(描述=(地址=(协议= TCP)(主机= test.acme.org)(端口= 1521))(CONNECT_DATA =(服务器=专用)(SERVICE_NAME = XE)))

If you compare that with yours definition, not that there is "SERVICE_NAME" parameter. 如果将其与您的定义进行比较,则不存在“ SERVICE_NAME”参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM