Sqldeveloper 设置TNS 链接配置文件

Sqldeveloper介绍:

Oracle SQL Developer is a free and fully supported graphical tool for database development. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, as well as create and save your own. SQL Developer enhances productivity and simplifies your database development tasks

sqldeveloper查找TNS文件的规则:

When you start SQL Developer and whenever you display the database connections dialog box, SQL Developer automatically reads any connections defined in the tnsnames.ora file on your system, if that file exists. You can specify the tnsnames.ora location in the Database: [b]Advanced preferences[/b].By default, tnsnames.ora is located in the [b]$ORACLE_HOME/network/admin[/b] directory, but it can also be in the directory specified by the TNS_ADMIN environment variable or registry value or (on Linux systems) the global configuration directory. On Windows systems, if the tnsnames.ora file exists but its connections are not being used by SQL Developer, define TNS_ADMIN as a system environment variable. For information about the tnsnames.ora file, see the "Local Naming Parameters (tnsnames.ora)" chapter in Oracle Database Net Services Reference.

配置环境变量TNS_ADMIN,TNS_NAME,ORACLE_HOME 对于没有安装oracle 或 oracle client的环境,一般不会设置这两个环境变量。
我的系统是oracle linux x86_64,虽然安装有Oracle但是没有设定开机载入环境变量,所以最方便的还是直接在 Tools -> Preferences -> Database -> Advanced 下面直接指定 Tnsnames Directory. 然后把需要的 tnsnames.ora文件copy 一份在该目录下。


[img]http://dl2.iteye.com/upload/attachment/0102/7572/447b5afa-0a59-3047-a749-e14bad308488.png[/img]


然后重启sqldeveloper,就可一在新建数据库链接的时候找到tns 定义了


[img]http://dl2.iteye.com/upload/attachment/0102/7574/a8fd823a-0cee-3483-8b92-eb80ef2dd7e3.png[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值