跑步时
lsnrctl status
Run Code Online (Sandbox Code Playgroud)
我可以看到它使用的是旧主机名,但我不知道它从哪里提取该值。
我的 Oracle 在 Windows7 x64 上的安装是 11.2.0,如果这有什么不同的话。
当您运行时lsnrctl status
,它告诉您的一件事是侦听器参数文件(listener.ora 文件)的位置
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 06-JUN-2012 13:12:22
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 06-JUN-2012 09:33:58
Uptime 0 days 3 hr. 38 min. 24 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File c:\oracle\diag\tnslsnr\jcave8560w\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "jcave11gR2XDB" has 1 instance(s).
Instance "jcave11gr2", status READY, has 1 handler(s) for this service...
Service "jcave11gr2" has 1 instance(s).
Instance "jcave11gr2", status READY, has 1 handler(s) for this service...
The command completed successfully
Run Code Online (Sandbox Code Playgroud)
如果你打开那个文件,可能会有这样的条目
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
Run Code Online (Sandbox Code Playgroud)
指定主机的位置。更改那里的主机并重新启动侦听器。