oracle10g多个数据库与监听器


在oracle10g中,其实一个监听器就可以监听几个数据库,他们是通过
db_domain=legeen.com
db_name=orcl
参数区别,
在tnsname.ora文件中,如果有两个数据库配置如:
ROR =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = heqinghui.sl.prc.grp.nwtmt.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ror.sunlong.com)
    )
  )
orcl =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = heqinghui.sl.prc.grp.nwtmt.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.legeen.com)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

重要的一点是要和参数文件中的值相对应。
listener.ora文件中的设置如:
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product\10.1.0\Db_1)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = heqinghui.sl.prc.grp.nwtmt.com)(PORT = 1521))
    )
  )

之前由于参数设置不一致曾经浪费了一些时间。

你可能感兴趣的:(oracle)