zoukankan      html  css  js  c++  java
  • PLSQL Developer 远程连接Oracle数据库

    下载、安装、激活PLSQL Developer,本例使用 PLSQL Developer 13 (64 bit)。

    下载Oracle即时客户端 Instant Client,本例使用11gR2

       链接:http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html

       关于即时客户端 Instant Client: https://www.oracle.com/technetwork/cn/topics/instantclient-095449-zhs.html

    第一步:监听配置文件

        解压下载的Oracle客户端-->instantclient,放置到一个固定的地方(避免被删),在其目录下新建文件夹 etworkadmin,已下或称“该文件夹”

     方法1: 若本机装有Oracle数据库,将Oracle数据库配置文件(3个.ora文件,路径在appAdministratorproduct11.2.0dbhome_1NETWORKADMIN)拷贝到该文件夹下,将对应的服务器IP和全局数据库名改掉(参考方法二)。

       方法2: 在该文件夹下手动创建3个文件

        listener.ora

        SID_LIST_LISTENER =
         (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:apporacle12cproduct12.2.0dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:apporacle12cproduct12.2.0dbhome_1inoraclr12.dll")
        )
      )
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服务器ip)(PORT = 1521))    
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )

      )

    tnsnames.ora

    LISTENER_ORCL =

      (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服务器ip)(PORT = 1521))

    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (CONNECT_DATA =
          (SID = ORCL)
          (PRESENTATION = RO)
        )
      )

    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服务器ip)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)    #Oracle 全局数据库名
        )
      )

    sqlnet.ora

    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    #远程无法连接数据库 在数据库服务器sqlnet.ora中加上这段
    SQLNET.ALLOWED_LOGON_VERSION=8   

    第二步:PLSQL Developer客户端配置

    不登录账户直接打开,configure配置—preference首选项—connect连接。

    Oracle Home主目录:...instantclient_11_2 (Oracle即时客户端所在路径)

    OCILibrary库:...instantclient_11_2oci.dll (Oracle即时客户端主目录中的oci.dll文件)

    Apply应用——OK确定,重启,登录可以连接了!

  • 相关阅读:
    找不到或无法加载主类
    Syntax error , insert “EnumBody” to complete EnumDeclaration
    The type javax.servlet.http.HttpServletRequest cannot be resolved. It is indirectly referenced from required .class files
    003 Fiddler 界面
    002 Fiddler 配置
    001 Fiddler 安装
    C++的函数重载
    001 位运算
    【纪中受难记】——C2Day2:dp不能
    连续函数的根
  • 原文地址:https://www.cnblogs.com/yzhyingcool/p/10431833.html
Copyright © 2011-2022 走看看