• 如何配置PL/SQL连接数据库


      1.首先需要配置oracle的环境变量,如下图,路径就是oracle客户端的安装位置

      

     2.之后需要配置2个文件,分别是tnsnames.org和listener.org,位置在E:appAdministratorproduct11.2.0dbhome_1NETWORKADMIN(oracle客户端的安装路径)

       tnsnames.org的配置如下

       orcl =  //orcl是连接的数据库名
        (DESCRIPTION =
          (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.253.6)(PORT = 1521))  //这里配置IP和端口
        )
        (CONNECT_DATA =
          (SERVICE_NAME = orcl)  //这里也是数据库名
        )
      )

      listener.org的配置如下

      SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = E:appAdministratorproduct11.2.0dbhome_1)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = ORCL)
          (ORACLE_HOME = E:appAdministratorproduct11.2.0dbhome_1)
        (SID_NAME = ORCL)  
        )
      )  

      LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        )
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.253.6)(PORT = 1521))
        )    
      )

  • 相关阅读:
    (bfs入门)宝岛探险
    (bfs入门)走迷宫
    环形的处理P1880 [NOI1995]石子合并
    ZOJ2227Minimax三角划分
    UVA11400 Lighting System Design
    字符串匹配入门
    UVA12563 Jin Ge Jin Qu hao
    HDU1619 Unidirectional TSP
    ZOJ2581Tour
    UVA1025 A Spy in the Metro
  • 原文地址:https://www.cnblogs.com/callmexiaozhang/p/5260598.html
Copyright © 2020-2023  润新知