问题描述
我使用sql-developer与几个不同的用户连接到几个不同的oracle数据库.连接信息保存在tnsnames.ora
文件中,因此当数据库更改服务器时,我不必手动更新与其的所有连接.我最近更新了tnsnames文件,现在网络别名列表中有2个条目,每个条目都应该存在.第二个条目似乎起作用(我测试连接时IE通过了测试).但是,默认情况下,似乎选择了第一个条目,这是行不通的.
I use sql-developer to connect to several different oracle databases with several different users. The connection info is kept in a tnsnames.ora
file so that when a database changes servers, I don't have to manually update all my connections to it. I recently updated my tnsnames file, and now there are 2 entries in the network alias list for each one that should be there. The 2nd entry appears to work (IE passes the test when I test the connection). However, by default, it seems to choose the first entry, which doesn't work.
我怀疑这是由于此处的答案所致:,但是,该答案并未解决如何解决该问题.
I suspect this is due to the answer here: Oracle TNS names not showing when adding new connection to SQL Developer however, that answer doesn't address how to fix that problem.
那么,如何彻底清除网络别名列表并强制其从文件中重新加载?
So, how do I completely clear the network alias list and force it to re-load from the file?
推荐答案
它正在获取我在同一文件夹中的tnsnames.ora_OLD的旧副本.根据:
It was grabbing an old copy of tnsnames.ora_OLD that I had in the same folder. According to:
http://forums.oracle.com/forums/thread.jspa?threadID=1017751
"SQL Developer的TNS名称功能具有长期的功能,SQL Developer可以在TNS Admin目录中找到所有匹配的tnsnames.ora *文件并列出所有内容.例如,所有TNS TNSNAMES.ORA,TNSNAMES.ORA〜和TNSNAMES.ORA.201001210957中定义的别名将包含在网络别名"列表中."
"There is a longstanding feature with SQL Developer's TNS Names functionality where SQL Developer will find all of the matching tnsnames.ora* files in the TNS Admin directory and list the contents of all of them. For example, all of the TNS aliases defined in TNSNAMES.ORA, TNSNAMES.ORA~ and TNSNAMES.ORA.201001210957 will be included in the Network Alias list."
删除旧文件会删除多余的条目.
Deleting that old file removed the extra entries.
这篇关于SQLDeveloper:清除网络别名列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!