配置listener.ora监听多个端口



原始的内容是:

# listener.ora Network Configuration File: E:\app\Administrator\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 = E:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-R9FGL6FQMTP)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = E:\app\Administrator


LISTENER_LHH =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-R9FGL6FQMTP)(PORT = 1522))
    )
  )

ADR_BASE_LISTENER_LHH = E:\app\Administrator

FSYD =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-R9FGL6FQMTP)(PORT = 1523))
    )
  )

ADR_BASE_FSYD = E:\app\Administrator






配置两个端口的方法,修改listener.ora这个文件如下:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
    )

    (SID_DESC =
      (GLOBAL_DBNAME = znwysys)
      (ORACLE_HOME =E:\app\Administrator\product\11.2.0\dbhome_1)
      (SID_NAME = znwysys)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST =WIN-R9FGL6FQMTP)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST =WIN-R9FGL6FQMTP)(PORT = 1522))
	  (ADDRESS = (PROTOCOL = TCP)(HOST =WIN-R9FGL6FQMTP)(PORT = 1523))
    )
  )
  
ADR_BASE_FSYD = E:\app\Administrator




这样下面的这两个内容:

conn sys/[email protected]:1521/znwysys as sysdba

和

conn sys/[email protected]:1522/fsyd as sysdba

都是可以的。


你可能感兴趣的:(listener)