码迷,mamicode.com
首页 > 数据库 > 详细

oracle网络配置

时间:2019-02-07 09:15:49      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:rod   rate   product   file   动态   静态监听   基本   max   sys   

listener.ora

# listener.ora Network Configuration File: D:\ora\huangwei\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

--配置静态注册监听器
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\ora\huangwei\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\ora\huangwei\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  (SID_DESC =
      (GLOBAL_DBNAME = hello1)
      (ORACLE_HOME = D:\ora\huangwei\product\11.2.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.206)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = D:\ora\huangwei

--配置动态注册监听器
LISTENER_dongtai =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.206)(PORT = 1522))
    )
  )

-------------------------------------------------------------------------------------------------------
SID_LIST_LISTENER:用于提供 监听“LISTENER” 所能够静态支持的服务信息。
LISTENER:监听名字、连接协议、监听主机、监听端口等基本配置信息
SID_NAME,数据库实例名
GLOBAL_DBNAME就是数据库服务名,可以省略,默认和SID_NAME保持一致,也可以不一致。和tnsnames的service_name保持一致。本服务的别名,用于客户端SERVICE_NAME识别
ORACLE_HOME,默认和$ORACLE_HOME环境变量保持一致。
-----------------------------------------------------------------------------------------------------


tnsname.ora

--静态
VLE =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.206)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = hello1)
    )
  )
-------------------------------
vle scott/tiger@vle 连接名
SERVICE_NAME := 监听端的GLOBAL_DBNAME
------------------------------

--动态
ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.206)(PORT = 1522))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

动态监听配置步骤:
1.配置动态注册监听器
2.将local_listener的值改为动态监听器信息,例如: alter system set local_listener=‘(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.206)(PORT = 1522)))‘;或者alter system set local_listener=tnsnames的ORCL
3.动态监听的服务名默认为数据库service_name决定:show parameter service_name
4.配置客户端连接字符串




linux 静态监听
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.38.131)(PORT = 1521))
    )
  )
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
                      #BEQUEATH CONFIG
         (GLOBAL_DBNAME=orcl)
         (SID_NAME=orcl)
         (ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1)
                      #PRESPAWN CONFIG
        (PRESPAWN_MAX=20)
        (PRESPAWN_LIST=
          (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
        )
       )
      )
ADR_BASE_LISTENER = /data/u01/app/oracle

oracle网络配置

标签:rod   rate   product   file   动态   静态监听   基本   max   sys   

原文地址:https://www.cnblogs.com/viery/p/10354439.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!