如何实现Oracle的监听(listener)多个IP地址

时间:2022-02-05 08:39:11


在实际工作中,一个oracle服务经常需要给多个IP提供监听和服务工作,下面我们来介绍如何给Oracle增加listen的IP地址,即使oracle监听服务增加一个ip地址;

 1)listener.ora中手动增加个地址,然后重新启动listener服务即可;

如何实现Oracle的监听(listener)多个IP地址


b)使用oracle管理工具NetManager来实现,如下所示:


如何实现Oracle的监听(listener)多个IP地址


listener.ora  的具体例子   

# listener.ora Network Configuration File: D:\oracle\server\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:\oracle\server\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:d:\oracle\server\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
   (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME = d:\oracle\server\product\11.2.0\dbhome_1)
      (SID_NAME = orcl)
    )
  )


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


ADR_BASE_LISTENER = d:\oracle\server