Oracle PL Sql Developer找不到我的tnsnames.ora文件 [英] Oracle PL Sql Developer cannot find my tnsnames.ora file

查看:3022
本文介绍了Oracle PL Sql Developer找不到我的tnsnames.ora文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个以前工作场所的Oracle tnsnames.ora文件.我想在另一台计算机上使用新安装的PL SQL Developer进行安装.我已将文件复制到..ORACLE/product/11.2.0/client_32/NETWORK/ADMIN,但PL SQL Developer无法找到它.

I have an Oracle tnsnames.ora file from my previous workplace. I want to pick it up with my newly installed PL SQL Developer on another computer. I have copied the file into ..ORACLE/product/11.2.0/client_32/NETWORK/ADMIN but PL SQL Developer cannot find it.

启动时,没有显示任何数据库选择. 在About-> i-> TNSNames中,我看不到任何行

When it starts it is not showing me any choice of database. In About->i->TNSNames I dont see any lines

我在工具"->首选项"->数据库"-> ...中找到了许多建议来查找它,但是我的首选项中没有数据库"选项卡.

I have found a number of advices to look for it in Tools->Preferences->Database->..., but I dont have a Database tab in my preferences.

我该如何解决?

推荐答案

如果您确定自己的tnsnames.ora文件正确(例如,通过测试与Oracle Net Config Assistant的连接,或者使用SQLplus成功登录),并且您可以打开PLSQL Developer应用程序,但仍然无法连接到PLSQL Developer中的数据库,然后执行以下步骤:

If you are certain your tnsnames.ora file is correct (eg by testing the connection with the Oracle Net Config Assistant, or logging in successfully with SQLplus), and you are able to open the PLSQL Developer application, but you still can't connect to the database in PLSQL Developer, then follow these steps:

  1. 在PLSQL Developer(版本11.0)中,转到帮助/支持信息"

  1. In PLSQL Developer (version 11.0) go to Help/Support Info

单击"TNS名称"选项卡.如果PLSQL Developer中的路径错误,它将为空白(找不到tns文件)或不正确(正在使用错误的tns文件)

Click the TNS Names tab. If the path in PLSQL Developer is wrong it will be blank (no tns file found) or incorrect (wrong tns file in use)

在信息"选项卡上,向下滚动到"TNS文件"条目,并查看PLSQL Developer正在使用的tns文件的路径.这很可能是错误的.

On the Info tab scroll down to the TNS File entry and to see the path for the tns file PLSQL Developer is using. Very likely this is wrong.

更正路径:

  • 打开命令提示符
  • 导航到程序文件中的PLSQL Developer目录
  • 输入以下命令:
  • open a command prompt
  • navigate to the PLSQL Developer directory in Program Files
  • enter this command:

plsqldev.exe TNS_ADMIN = c:\ your \ tns \ directory \ path \此处

plsqldev.exe TNS_ADMIN=c:\your\tns\directory\path\here

* path到包含您的tnsnames.ora文件的目录- 对我来说,这是:c:\ Oracle \ product \ 11.2.0 \ client_1 \ network \ admin

*path is to the directory containing your tnsnames.ora file - for me this is: c:\Oracle\product\11.2.0\client_1\network\admin

将打开一个新的PLSQL Developer UI,您应该可以连接.

A new PLSQL Developer UI will open and you should be able to connect.

确保您已将Windows环境变量TNS_ADMIN设置为相同的路径

Make sure you have a Windows environment variable TNS_ADMIN set to the same path

  • 在Windows 7上,您依次转到开始",控制面板",系统",高级系统设置",环境变量"以查看/添加/更新环境变量

这篇关于Oracle PL Sql Developer找不到我的tnsnames.ora文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆