当服务器和客户端在同一台机器上时如何配置 oracle 侦听器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4512367/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to configure oracle listener when server & client are on same box
提问by Martin08
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?
我有 2 个 Oracle 数据库服务器。如何在本地服务器上配置侦听器和 TNS 名称,以便本地服务器可以运行外部程序并访问远程程序?
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))
)
回答by DCookie
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.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))
)
)