Home > Database > Mysql Tutorial > PL/SQL Developer连接Oracle数据库

PL/SQL Developer连接Oracle数据库

WBOY
Release: 2016-06-07 17:00:08
Original
1029 people have browsed it

一般可以分为三步:1.安装oracle客户端,下一步,下一步就可以了,基本不用改什么东西。2.配置本地名字解析tnsnames.ora,不用它

一般可以分为三步:
1.安装Oracle客户端,,下一步,下一步就可以了,基本不用改什么东西。
2.配置本地名字解析tnsnames.ora,不用它直接输连接字符串也行。
3.连接。

说下名字解析的配置:
在tnsnames.ora加入以下内容
ORCL_1.1.1.1_dedicated =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
这是以专用模式连接,当然如果服务器支持共享模式,也可以以共享模式连接:
ORCL_1.1.1.1_shared =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = SHARED)
      (SERVICE_NAME = orcl)
    )
  )


也可以直接在连接字符串中输入
conn hr/hr@1.1.1.1:1521/orcl

在确保oracle服务器监听打开,并且ip地址和端口号正确的话,如果出现连接超时错误,极

大可能与防火墙有关,可以先关掉防火墙,在尝试连接。
service iptables stop----linux下暂时关闭防火墙

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template