我创建了两个名为test
的数据库和一个名为archivio
的数据库。 SID
等于name
。我还为SID测试创建了一个侦听器,它在端口1521上响应,另一个用于应该在端口1522上应答的SID archivio。
我已验证服务是否有效
第一个侦听器正常工作。第二个报告给archivio数据库,不起作用。我使用网络管理器执行测试。错误消息是:
侦听器当前不知道连接描述符
中请求的服务
使用oracle sql developer我可以连接到db archivio
如果我使用本地而不是基本类型连接
其他信息:
Windows 7终极版oracle 12c
LISTNER.ORA
# listener.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\listener.ora
# Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1522))
)
ADR_BASE_LISTENER1 = C:\app\cirom
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1521))
)
ADR_BASE_LISTENER = C:\app\cirom
ADR_BASE_LISTENER1 = C:\app\cirom
TNSNAMES.ORA
# tnsnames.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\tnsnames.ora
# Generated by Oracle configuration tools.
ARCHIVIO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = archivio)
)
)
LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ARCHIVIO =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
答案 0 :(得分:0)
为了在非默认端口(而不是TCP 1521)上运行的侦听器上注册Oracle实例,您必须配置LOCAL_LISTENER参数,例如: (ADDRESS =(PROTOCOL = TCP)(HOST =主机名)(PORT = 1522))
命令是:
alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))' scope=both;
使用您的主机名更改主机名。
然后重启数据库或发出命令:
alter system register;
乔瓦尼