oracle网络配置

前端之家收集整理的这篇文章主要介绍了oracle网络配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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/[email protected] 连接名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的ORCL3.动态监听的服务名默认为数据库service_name决定:show parameter service_name4.配置客户端连接字符串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相关文章