database ORA-12154: TNS: 无法解析使用 TOAD 客户端指定的连接标识符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19157915/
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
ORA-12154: TNS:could not resolve the connect identifier specified using TOAD client
提问by Harmeet Singh Taara
I try to using connect with remote database using TOAD client. My oracle version is 10.2g. I follow these instructions that specified on this link, instead of step 13, because i cant understand what they explain link. My Oracle TNS_ADMIN path is C:\oracle\product\10.2.0\db_1\network\ADMINand ORACLE_HOME is C:\oracle\product\10.2.0\db_1. I found may question regarding this query, but i am not found my answer.
我尝试使用 TOAD 客户端连接远程数据库。我的oracle版本是10.2g。我遵循此链接上指定的这些说明,而不是第 13 步,因为我无法理解它们对链接的解释 。我的 Oracle TNS_ADMIN 路径是C:\oracle\product\10.2.0\db_1\network\ADMIN,ORACLE_HOME 是C:\oracle\product\10.2.0\db_1. 我发现可能对这个查询有疑问,但我没有找到我的答案。
回答by GoldDragonTSU
We encountered this issue as well with Toad 10.x and Oracle Instant Client 11.2.x. The (rather silly) solution for us was to add a comment to the very top of the tnsnames.ora file. So for Step #8 in the linked instructions, the tnsnames.ora file would have this instead:
我们在 Toad 10.x 和 Oracle Instant Client 11.2.x 中也遇到了这个问题。对我们来说(相当愚蠢的)解决方案是在 tnsnames.ora 文件的最顶部添加一条注释。因此,对于链接说明中的第 8 步,tnsnames.ora 文件将改为:
# Leave whitespace before your first entry below...
VIS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <host_name or ip_address>)(PORT = 1521))
)
(CONNECT_DATA =
(SID = <instance_name>)
(SERVER = DEDICATED)
)
)
回答by astrob0t
Could you please verify your TOAD installation directory?
你能验证一下你的 TOAD 安装目录吗?
If it is something like C:\Program Files (x86)\..., the below link may help:
如果是这样的C:\Program Files (x86)\...,下面的链接可能会有所帮助:
Apparently there are issues when installing the 32 bit version of TOAD into a directory that contains '()' chracters.
显然,将 32 位版本的 TOAD 安装到包含“()”字符的目录中时会出现问题。
回答by Asif
In my case, it was solved by removing extra white space connection name. there should be no white space in just before "TEST.CONN" and none of the other entries in tns file can have the same.
就我而言,它是通过删除额外的空白连接名称来解决的。在“TEST.CONN”之前不应该有空格,并且 tns 文件中的其他条目都不能具有相同的空格。
(No White Space)TEST.CONN= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=) (PORT=) ) (CONNECT_DATA= (SERVICE_NAME=) ) )
(无空格)TEST.CONN= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=) (PORT=) ) (CONNECT_DATA= (SERVICE_NAME=) ) )

