好的一切都很好,直到昨天我突然得到这个错误
ORA-12514:TNS:监听器当前不知道连接描述符中请求的服务
没有任何修改
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jainam-2b1c493d)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
我完全陷入困境,不知道该怎么做。
我从这里尝试了帮助
http://dba-oracle.com/t_ora_12514_tns_listener_does_not_currently_know_service_requested.htm
但没用
感谢
编辑:
这是输出到lsnrctl service
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 3 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
"ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_6B4_641B624E_B22.ORA))
"ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_6B4_641B624E_282.ORA))
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: JAINAM-2B1C493D, pid: 3708>
(ADDRESS=(PROTOCOL=tcp)(HOST=jainam-2b1c493d)(PORT=2763))
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
答案 0 :(得分:5)
对我来说,它有助于将以下SID_DESC添加到C:\ oraclexe \ app \ oracle \ product \ 11.2.0 \ server \ network \ ADMIN \ listener.ora
SID_LIST_LISTENER =
(SID_LIST =
...
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
)
重新启动侦听器和数据库后,访问再次起作用。
感谢http://grow-n-shine.blogspot.de/2011/11/oracle-11g-xe-issue-ora-12514.html
答案 1 :(得分:2)
您遇到此类错误的原因之一是因为数据库实例在侦听器之前启动。必须始终先启动监听器。
lsnrctl service
命令的输出,看看注册了哪些服务。SERVICE_NAME
。alter system register
以注册实例。答案 2 :(得分:2)
打开SQL Plus并连接到系统用户:
system/p@ssword
并运行两个命令:
SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' scope=both;
SQL> alter system register;