在 Oracle SQL Developer 中使用 tnsnames.ora
我正在评估 Oracle SQL Developer。
我的 tnsnames.ora 已填充,并且到 tnsnames.ora 中定义的连接的 tnsping 工作正常。尽管如此,SQL Developer 仍不显示任何连接。
Oracle SQL Developer 飙升 提到,如果
您的计算机上已安装了 Oracle 客户端软件和 tnsnames.ora 文件,Oracle SQL Developer 将自动从 tnsnames.ora 中定义的网络服务名称填充连接导航器。
我还尝试设置我的 TNS_ADMIN
环境变量,但重新启动 SQL Developer 后仍然没有显示连接。
有什么想法吗?
有人成功使用 SQL Developer 和 tnsnames.ora 吗?
I am evaluating Oracle SQL Developer.
My tnsnames.ora
is populated, and a tnsping
to a connection defined in tnsnames.ora
works fine. Still, SQL Developer does not display any connections.
Oracle SQL Developer Soars mentions, that if
you have Oracle client software and a tnsnames.ora file already installed on your machine, Oracle SQL Developer will automatically populate the Connections navigator from the net service names defined in tnsnames.ora.
I also tried to set my TNS_ADMIN
environment variable, but after restarting SQL Developer there are still no connections displayed.
Any ideas?
Anyone successfully working with SQL Developer and tnsnames.ora?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
工具 -->首选项
,如下图所示。展开数据库 -->选择高级-->在“Tnsnames 目录”下 -->浏览 tnsnames.ora 所在的目录
。如下图所示。
tnsnames.ora 位于
Drive:\oracle\product\10x.xx\client_x\NETWORK\ADMIN
< br>Tools --> Preferences
, as shown in below image.expand Database --> select Advanced --> under "Tnsnames Directory" --> Browse the directory
where tnsnames.ora present.as shown in below diagram.
tnsnames.ora available at
Drive:\oracle\product\10x.x.x\client_x\NETWORK\ADMIN
这个很好的答案 一个类似的问题(不幸的是,我之前找不到)帮助我解决了问题。
复制引用答案中的内容:
This excellent answer to a similar question (that I could not find before, unfortunately) helped me solve the problem.
Copying Content from referenced answer :
我遇到了同样的问题,
tnsnames.ora
对于所有其他工具都工作得很好,但 SQL Developer 不会使用它。我尝试了网上能找到的所有建议,包括此处提供的链接上的解决方案。什么都没起作用。
事实证明,数据库正在缓存
tnsnames.ora
的备份副本,例如tnsnames.ora.bk2
、tnsnames09042811AM4501.bak
、tnsnames .ora.bk
等。这些文件对于普通用户来说是无法读取的。我怀疑 sqldeveloper 正在与名称进行模式匹配,它试图读取这些备份副本之一,但无法读取。所以它只是优雅地失败并且在下拉列表中不显示任何内容。
解决方案是使所有文件可读或删除或将备份副本移出管理目录。
I had the same problem,
tnsnames.ora
worked fine for all other tools but SQL Developer would not use it. I tried all the suggestions on the web I could find, including the solutions on the link provided here.Nothing worked.
It turns out that the database was caching backup copies of
tnsnames.ora
liketnsnames.ora.bk2
,tnsnames09042811AM4501.bak
,tnsnames.ora.bk
etc. These files were not readable by the average user.I suspect sqldeveloper is pattern matching for the name and it was trying to read one of these backup copies and couldn't. So it just fails gracefully and shows nothing in drop down list.
The solution is to make all the files readable or delete or move the backup copies out of the Admin directory.
这对我有帮助:
发布:8/12/2011 4:54
设置 tnsnames 目录
工具->首选项->数据库->高级->Tnsnames目录
https://forums.oracle.com/forums/thread.jspa?messageID=10020012�
This helped me:
Posted: 8/12/2011 4:54
Set tnsnames directory
tools->Preferences->Database->advanced->Tnsnames Directory
https://forums.oracle.com/forums/thread.jspa?messageID=10020012�
在较新版本的 macOS 上,还必须设置 java.library.path。最简单/最安全的方法 [1] 是创建
~/.sqldeveloper//sqldeveloper.conf
文件并按如下方式填充:[1] https://community.oracle.com/message/14132189#14132189
On the newer versions of macOS, one also has to set
java.library.path
. The easiest/safest way to do that [1] is by creating~/.sqldeveloper/<version>/sqldeveloper.conf
file and populating it as such:[1] https://community.oracle.com/message/14132189#14132189