oracle 无法与 TOAD 连接,但可以与其他工具/应用程序连接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/926323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 18:18:19  来源:igfitidea点击:

Cannot Connect with TOAD but Can with Other Tools/Apps

oracledatabase-connectionsqlplustoad

提问by Kit

I am able to connect to an Oracle database using several tools, but am unable to connect using Toad for Oracle 8.5.3 (though before a login/logout to Windows I was able to).

我能够使用多种工具连接到 Oracle 数据库,但无法使用 Toad for Oracle 8.5.3 进行连接(尽管在登录/注销到 Windows 之前我能够连接)。

I am not using TNSNAMES.ORAto connect. I have two Oracle homes:

我没有使用TNSNAMES.ORA进行连接。我有两个 Oracle 主目录:

C:\Oracle\product\10.2.0\client_1 (OraClient10g_home1)and C:\Oracle\product\10.2.0\client_2(ODACHome2)

C:\Oracle\product\10.2.0\client_1 (OraClient10g_home1)C:\Oracle\product\10.2.0\client_2(ODACHome2)

where client 2 was installed after client 1.

客户端 2 安装在客户端 1 之后。

I have tried Toad with each home, but I get "ORA-12154: TNS:could not resolve the connect identifier specified" when I supply the database name, user name, and password. I can connect using SQL*Plus using this same information, and I can connect via ADO.NET (ODP.NET). tnsping(client 2) to the server works, but tnsping(client 1) does not.

我已经在每个家庭中尝试了 Toad,但是当我提供数据库名称、用户名和密码时,我得到“ORA-12154:TNS:无法解析指定的连接标识符”。我可以使用相同的信息使用 SQL*Plus 进行连接,并且可以通过 ADO.NET (ODP.NET) 进行连接。到服务器的tnsping(客户端 2)有效,但tnsping(客户端 1)无效。

My PATHenvironment variable contains, in order:

我的PATH环境变量按顺序包含:

C:\oracle\product\10.2.0\client_2\bin;C:\oracle\product\10.2.0\client_1\bin

C:\oracle\product\10.2.0\client_2\bin;C:\oracle\product\10.2.0\client_1\bin

and changing the order of PATHseems to have no effect. When I added the line

并且更改PATH的顺序似乎没有效果。当我添加该行时

NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)

NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)

to sqlnet.oraof client 2, Toad still could not connect, but the error message appeared much more quickly.

到客户端 2 的sqlnet.ora,Toad 仍然无法连接,但错误信息出现的速度更快。

回答by Kit

I found the answer rather quickly after I posted, but I don't know if this is the best solution. I copied the ldap.orafile from client 1 to client 2. ldap.orahad lines like the following, which I have munged for security reasons:

我发布后很快就找到了答案,但我不知道这是否是最佳解决方案。我将ldap.ora文件从客户端 1复制到客户端 2。ldap.ora有如下几行,出于安​​全原因,我对其进行了修改:

DIRECTORY_SERVERS= (XXXXX:389:636,YYYYY:389:636)

DEFAULT_ADMIN_CONTEXT = ""

DIRECTORY_SERVER_TYPE = OID
DIRECTORY_SERVERS= (XXXXX:389:636,YYYYY:389:636)

DEFAULT_ADMIN_CONTEXT = ""

DIRECTORY_SERVER_TYPE = OID