Oracle 18c 监听器无法启动
Oracle 18c Listener unable to start
所以我安装了 Oracle 18C XE 并且能够连接到它。几天后回到它,我可以使用 SQLPlus 连接到它,使用 sys 作为 Sysdba,但我无法连接到 SQL Developer。
Starting the listener through services results in an error saying the
OracleOraDB18Home1TNSListener service on local computer started then
stopped.
lstnrctl 从管理员 cmd 行开始给出以下错误:
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed
because target host or object does not exist 64-bit Windows Error:
49: Unknown error
好的 - 所以我可以 ping tnsnames.ora 中列出的 IP,但我无法通过该 IP 远程登录到 1521
从 tnsnames.ora
生成的 xe 条目
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.82)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
为了更好地衡量 lstnrctl 状态是:
C:\WINDOWS\system32>lsnrctl 状态
64 位的 LSNRCTL Windows:版本 18.0.0.0.0 - 2020 年 6 月 2 日生产 08:25:17
版权所有 (c) 1991、2018,甲骨文。保留所有权利。
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.82)(PORT=1521)))
TNS-12535: TNS:operation timed out
TNS-12560: TNS:protocol adapter error
TNS-00505: Operation timed out
64-bit Windows Error: 60: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
我该如何解决这个问题?我只需要在 oracle 上测试 entity framework 应用程序。
我可以看出 IP 地址是错误的,但这只是本地应用程序开发的本地安装。我可以使用 Localhost 吗?
我已经更新了 tnsnames 和 listener 如下:
listener
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Fraser\product.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Fraser\product.0.0\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
tnsnames
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
但是 SQL 开发者现在告诉 returns 'ora-12514, tns:listener does not currently know of service requested in connect descriptor'
连接属性是
username: sys as sysdba
PASSWORD: (confirmed with sql plus login)
hostname:localhost
port:1521
SID XE
Service name: XE
我使用 sid 或服务名称单选按钮得到相同的结果(sid 是 ora 12505 但它仍然引用不知道连接描述符中的 SID 的侦听器)
lsnrctl 现在是:
C:\WINDOWS\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 02-JUN-2020 09:52:58
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Start Date 02-JUN-2020 08:44:30
Uptime 0 days 1 hr. 8 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\app\Fraser\product.0.0\dbhomeXE\network\admin\listener.ora
Listener Log File C:\app\Fraser\product.0.0\diag\tnslsnr\SPR\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
tnsnames 格式是否错误?
是的,如果您只打算从本地计算机连接到 XE 数据库实例,则可以使用 localhost
...但是 它需要重新配置 Oracle Net(侦听器)和 Oracle XE 数据库,这不是那么容易。
所以我安装了 Oracle 18C XE 并且能够连接到它。几天后回到它,我可以使用 SQLPlus 连接到它,使用 sys 作为 Sysdba,但我无法连接到 SQL Developer。
Starting the listener through services results in an error saying the OracleOraDB18Home1TNSListener service on local computer started then stopped.
lstnrctl 从管理员 cmd 行开始给出以下错误:
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist 64-bit Windows Error: 49: Unknown error
好的 - 所以我可以 ping tnsnames.ora 中列出的 IP,但我无法通过该 IP 远程登录到 1521 从 tnsnames.ora
生成的 xe 条目XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.82)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
为了更好地衡量 lstnrctl 状态是:
C:\WINDOWS\system32>lsnrctl 状态
64 位的 LSNRCTL Windows:版本 18.0.0.0.0 - 2020 年 6 月 2 日生产 08:25:17
版权所有 (c) 1991、2018,甲骨文。保留所有权利。
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.82)(PORT=1521)))
TNS-12535: TNS:operation timed out
TNS-12560: TNS:protocol adapter error
TNS-00505: Operation timed out
64-bit Windows Error: 60: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
我该如何解决这个问题?我只需要在 oracle 上测试 entity framework 应用程序。
我可以看出 IP 地址是错误的,但这只是本地应用程序开发的本地安装。我可以使用 Localhost 吗?
我已经更新了 tnsnames 和 listener 如下:
listener
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Fraser\product.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Fraser\product.0.0\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
tnsnames
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
但是 SQL 开发者现在告诉 returns 'ora-12514, tns:listener does not currently know of service requested in connect descriptor'
连接属性是
username: sys as sysdba
PASSWORD: (confirmed with sql plus login)
hostname:localhost
port:1521
SID XE
Service name: XE
我使用 sid 或服务名称单选按钮得到相同的结果(sid 是 ora 12505 但它仍然引用不知道连接描述符中的 SID 的侦听器)
lsnrctl 现在是:
C:\WINDOWS\system32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 02-JUN-2020 09:52:58
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Start Date 02-JUN-2020 08:44:30
Uptime 0 days 1 hr. 8 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\app\Fraser\product.0.0\dbhomeXE\network\admin\listener.ora
Listener Log File C:\app\Fraser\product.0.0\diag\tnslsnr\SPR\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
tnsnames 格式是否错误?
是的,如果您只打算从本地计算机连接到 XE 数据库实例,则可以使用 localhost
...但是 它需要重新配置 Oracle Net(侦听器)和 Oracle XE 数据库,这不是那么容易。