如何使用PL/SQL Developer连接到远程Oracle DB? [英] How to connect to remote Oracle DB with PL/SQL Developer?

查看:117
本文介绍了如何使用PL/SQL Developer连接到远程Oracle DB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库"TEST",我将其连接到地址123.45.67.89:1521.

I have a database "TEST", to which I connect at address 123.45.67.89:1521.

如何使用PL/SQL Developer连接到它?

How do I connect to it using PL/SQL Developer?

推荐答案

我建议创建TNSNAMES.ORA文件.从您的Oracle Client安装目录中,导航到NETWORK \ ADMIN.您可能已经有一个名为TNSNAMES.ORA的文件,如果需要编辑,请使用您喜欢的文本编辑器创建它.

I would recommend creating a TNSNAMES.ORA file. From your Oracle Client install directory, navigate to NETWORK\ADMIN. You may already have a file called TNSNAMES.ORA, if so edit it, else create it using your favorite text editor.

接下来,只需添加一个像这样的条目:

Next, simply add an entry like this:

MYDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 123.45.67.89)(PORT = 1521))
    (CONNECT_DATA = (SID = TEST)(SERVER = DEDICATED))
  )

您可以将MYDB更改为所需的名称,这是应用程序将使用TNSNAMES的信息查找数据库的标识符.

You can change MYDB to whatever you like, this is the identifier that applications will will use to find the database using the info from TNSNAMES.

最后,使用MYDB作为PL/SQL Developer中的数据库登录.它应该在TNSNAMES.ORA中自动找到连接字符串.

Finally, login with MYDB as your database in PL/SQL Developer. It should automatically find the connection string in the TNSNAMES.ORA.

如果这不起作用,请单击帮助"->关于",然后单击左上角带有"i"的图标.第四个选项卡是"TNS名称"选项卡,检查它以确认它正在加载正确的TNSNAMES.ORA文件.如果不是,则您的计算机上可能安装了多个Oracle,并且您将需要找到正在使用的安装.

If that does not work, hit Help->About then click the icon with an "i" in it in the upper-lefthand corner. The fourth tab is the "TNS Names" tab, check it to confirm that it is loading the proper TNSNAMES.ORA file. If it is not, you may have multiple Oracle installations on your computer, and you will need to find the one that is in use.

这篇关于如何使用PL/SQL Developer连接到远程Oracle DB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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