服务器和服务器时如何配置oracle监听器客户在同一个盒子上

发布于 2024-10-08 13:13:40 字数 734 浏览 1 评论 0原文

我有 2 台 Oracle 数据库服务器。如何在本地服务器上配置侦听器和 TNS 名称,以便本地服务器可以运行外部程序并访问远程服务器?

到目前为止,我有以下非工作配置。这有什么问题吗?非常感谢。

****TNSNAMES.ORA****
local_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = localhost)(port = 1521))
      (address = (protocol = ipc)(key=extproc0))      
    )
    (connect_data =
      (service_name = local_instance)
    )
  )

remote_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = xxx.xxx.xxx.xxx)(port = 1521))
    )
    (connect_data =
      (service_name = remote_instance)
    )
  )

****LISTENER.ORA****  
listener =
  (description =
    (address = (protocol = tcp)(host = localhost)(port = 1526))
  )  

I have 2 Oracle database servers. How can I configure the listener(s) and TNS names on the local server so that the local server can run external procedures and access the remote one?

So far I have the following non-working configurations. What is wrong with it? Many thanks.

****TNSNAMES.ORA****
local_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = localhost)(port = 1521))
      (address = (protocol = ipc)(key=extproc0))      
    )
    (connect_data =
      (service_name = local_instance)
    )
  )

remote_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = xxx.xxx.xxx.xxx)(port = 1521))
    )
    (connect_data =
      (service_name = remote_instance)
    )
  )

****LISTENER.ORA****  
listener =
  (description =
    (address = (protocol = tcp)(host = localhost)(port = 1526))
  )  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

打小就很酷 2024-10-15 13:13:40

这对我们有用:

# TNSNAMES.ORA

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

local_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = localhost)(port = 1521))
    )
    (connect_data =
      (service_name = local_instance)
    )
  )

remote_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = xxx.xxx.xxx.xxx)(port = 1521))
    )
    (connect_data =
      (service_name = remote_instance)
    )
  )

# LISTENER.ORA
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\10.2.0_DB)
      (PROGRAM = extproc)
      (ENVS="EXTPROC_DLLS=ANY")
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

This is what works for us:

# TNSNAMES.ORA

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

local_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = localhost)(port = 1521))
    )
    (connect_data =
      (service_name = local_instance)
    )
  )

remote_instance =
  (description =
    (address_list =
      (address = (protocol = tcp)(host = xxx.xxx.xxx.xxx)(port = 1521))
    )
    (connect_data =
      (service_name = remote_instance)
    )
  )

# LISTENER.ORA
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\10.2.0_DB)
      (PROGRAM = extproc)
      (ENVS="EXTPROC_DLLS=ANY")
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文