gpt4 book ai didi

oracle - 如何在 Windows 10 中为 SQL Developer 设置 tnsnames.ora 位置

转载 作者:行者123 更新时间:2023-12-02 03:06:00 24 4
gpt4 key购买 nike

这个问题 ( Use tnsnames.ora in Oracle SQL Developer ) 看起来应该有答案。但是我的 SQL Developer 副本在数据库下没有高级(它确实有高级参数,但这没有帮助)。

我已经查看了所有首选项(和帮助),但找不到设置它的位置。接受的答案有一张漂亮的图片,而且是这样的:

In the Preferences options expand Database --> select Advanced --> under "Tnsnames Directory" --> Browse the directory where tnsnames.ora present.

我的图片大部分是匹配的,但是底部没有Tnsnames Directory选项。

此链接 ( http://www.oracle.com/technetwork/issue-archive/2008/08-may/o38sql-102034.html ) 提供以下有用信息:

A TNS connection uses an alias entry from a tnsnames.ora file. Oracle SQL Developer uses only one tnsnames.ora file. You may have more than one on your local machine or want to use the tnsnames.ora file on a remote machine, so note that Oracle SQL Developer looks sequentially for the tnsnames.ora file in the following locations:

  1. $HOME/.tnsnames.ora
  2. $TNS_ADMIN/tnsnames.ora
  3. /etc/tnsnames.ora (non-Windows systems)
  4. $ORACLE_HOME/network/admin/tnsnames.ora
  5. Registry key

我想使用 $ORACLE_HOME 选项,但前两个位置之一似乎有一个副本。而且我不确定 $HOME 或 $TNS_ADMIN 在哪里定义(所以我可以在那里复制我的好副本),或者更好的是,如何重新定义它以使用 $ORACLE_HOME 中的那个。

最佳答案

您提到的检查顺序是正确的。要查看该工具使用的是什么,有 2 个选择

1 - 在工作表中输入“show tns”

SQL> show tns
TNS Lookup locations
--------------------

Location used:
-------------
/Users/klrice

Available TNS Entries
---------------------
SQL>

2 - 同样在工作表中发出此命令。

setloglevel oracle.dbtools.raptor.utils INFO

此处包含详细信息的博文:http://krisrice.io/2008-04-16-it-seems-to-come-up-often-that-some/

enter image description here

关于oracle - 如何在 Windows 10 中为 SQL Developer 设置 tnsnames.ora 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42821030/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com