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文件的顺序如下:
1,$HOME/.tnsnames.ora
2,$TNS_ADMIN/tnsnames.ora
3,TNS_NAMES lookup key in the registry
4,/etc/tnsnames.ora ( non-windows )
5,$ORACLE_HOME/network/admin/tnsnames.ora
6,LocalMachine\SOFTWARE\ORACLE\ORACLE_HOME_KEY
7,LocalMachine\SOFTWARE\ORACLE\ORACLE_HOME
如果sqldeveloper没有找到合适的TNS文件,可以这样来给它设定需要的TNS文件:
1)配置环境变量TNS_ADMIN,让其指向TNS文件所在的目录,如:D:\Program Files\sqldeveloper;
2)在CMD中查看环境变量值是否正确,可使用命令:echo %TNS_ADMIN%,并重启sqldeveloper;
3)在sqldeveloper中,点击创建新链接按钮,Connection Type选择 TNS,Network Alias 中的下拉框中会显示出所有定义在TNS文件中的所有条目。