zoukankan      html  css  js  c++  java
  • 如何配置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))
        )    
      )

  • 相关阅读:
    关闭页面的Js方法
    正则
    css3颜色渐变
    HTML learning
    jquery dwn 开发学习
    前人栽树后人乘凉
    剑指offer-面试题53_2-0~n-1中缺失的数字-二分查找
    剑指offer-面试题53_1-在排序数组中查找数字-二分查找
    堆排序
    剑指offer-面试题52-两个链表的第一个公共节点-链表
  • 原文地址:https://www.cnblogs.com/callmexiaozhang/p/5260598.html
Copyright © 2011-2022 走看看