客户端工具远程连接oracle

一.开启服务器监听.
vi $ORACLE_HOME/network/admin/listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.116)(PORT = 1521))
    )
  )
ADR_BASE_LISTENER = /u01/app/oracle


启动监听
lsnrctl start
二.客户端连接
1.Navicat
a.安装navicat 10.0.11,然后下载oraociei10.dll放入navicat安装目录下的instantclient_10_2的下面.
b.打开navicat,建立连接:
连接类型:normal,ip:192.168.1.116,端口:1521,选sid:ora10g(从上面启动监听显示出来的信息看sid).输入用户名和密码:scott/tiger(记得system用户不允许远程连接)


2.PLSQL Developer(想要中文显示,下载安装包时,不要忘了下载语言包)
a.安装PLSQL Developer 10.0.5,打开登录,输入用户名和密码:scott/tiger,数据库:192.168.1.116:1521/ora10g,作为连接:normal,会报错oracle client not properly installed.
根据提示,很明显还缺oracle client,暂时借用navicat.
解决:点cancel,tools->preference->connection,oracle home填D:\navicat\instantclient_10_2,oci library填D:\navicat\instantclient_10_2\oci.dll
如果没装navicat还是到http://www.oracle.com/technetwork/topics/winsoft-085727.html页面,下载instantclient-basic-win32-11.2.0.1.0.zip,然后解压,再指定上面两个位置.

b.解决上步,再连接又提示service name没识别.
解决:vi $ORACLE_HOME/network/admin/listener.ora,在LISTENER之前加上
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = ora10g)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0)
    )
  )
再次连接就可以连上了!

你可能感兴趣的:(oracle)