oracle 尝试登录时出错:ORA-12154

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9324010/
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-19 00:37:10  来源:igfitidea点击:

Error when trying to log in: ORA-12154

oracleplsqldeveloperora-12154

提问by Nore

I am using Oracle 10gand PL/SQL Developer for the development. I have already tested from Net Manager that the database can be connected to, but when I tried to connect with PL/SQL Developer there was problem that I do not understand:

我使用 Oracle 10 g和 PL/SQL Developer 进行开发。我已经从 Net Manager 测试过可以连接数据库,但是当我尝试与 PL/SQL Developer 连接时,出现了我不明白的问题:

ORA-12154: TNS:could not resolve the connect identifier specified

I have already searched for solution for the problem but still it can't be resolved. Any advice?

我已经搜索了问题的解决方案,但仍然无法解决。有什么建议吗?

http://i.stack.imgur.com/OpjSI.png

http://i.stack.imgur.com/OpjSI.png

回答by Dirk Schumacher

This was a hard one. tnsping works. tnsnames.ora is correct. This post solved it for me: http://sambitimes.blogspot.de/2010/10/ora-12154-error-in-windows-7.html

这是一个艰难的过程。tnsping 工作。tnsnames.ora 是正确的。这篇文章为我解决了这个问题:http: //sambitimes.blogspot.de/2010/10/ora-12154-error-in-windows-7.html

If installation path of PL/SQL-Developer contains brackets, it screws up... This will not work with win7: "C:\Program Files (x86)\PLSQL Developer"

如果 PL/SQL-Developer 的安装路径包含括号,那就搞砸了... 这在 win7 下不起作用:“C:\Program Files (x86)\PLSQL Developer”

this does for me: "C:\Program Files\PLSQL Developer"

这对我有用:“C:\Program Files\PLSQL Developer”

I hope it helps for others.

我希望它对其他人有帮助。

回答by Rene

That usually means that the database name you specify is not in the tnsnames.ora file. If you open PL/SQL Developer you will find the option "support info" under the About menu. This has an entry such as this:

这通常意味着您指定的数据库名称不在 tnsnames.ora 文件中。如果您打开 PL/SQL Developer,您将在“关于”菜单下找到“支持信息”选项。这有一个这样的条目:

TNS File
  D:\Oracle\Designer\net80\admin\tnsnames.ora

Make sure your database is in this file.

确保您的数据库在此文件中。

回答by Szilard Barany

Oracle documentationsays:

Oracle 文档说:

Cause:A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a connect descriptor using one of the naming methods configured. For example, if the type of connect identifier used was a net service name then the net service name could not be found in a naming method repository, or the repository could not be located or reached.

原因:使用连接标识符请求连接到数据库或其他服务,并且无法使用配置的命名方法之一将指定的连接标识符解析为连接描述符。例如,如果使用的连接标识符类型是网络服务名称,则无法在命名方法存储库中找到该网络服务名称,或者无法定位或访问该存储库。

Are you trying to connect to the database the same way from Net Manager and PL/SQL Developer?

您是否尝试从 Net Manager 和 PL/SQL Developer 以相同的方式连接到数据库?