1
我知道這是一個非常流行的問題,而且我之前曾經遇到過幾次,但能夠解決它,但不能解決此問題時間。ORA-12514 TNS:偵聽器當前不知道現有服務的連接描述符中請求的服務
我已經運行
SQL> select value from v$parameter where name='service_names';
VALUE
--------------------------------------------------------------------------------
XE
我的tnsnames.ora有XE服務名稱確信,我使用的是正確的服務名稱:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
當我啓動監聽器,它似乎認識到服務: [根@ AA-AXM管理員]#LSNRCTL開始
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 09-OCT-2015 12:58:28
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/aa-axm/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)) (SERVICE_NAME=XE))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))(SERVICE_NAME=XE))
Connecting to (DESCRIPTION=(SERVICE_NAME=XE)(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 09-OCT-2015 12:58:28
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/aa-axm/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE))(SERVICE_NAME=XE))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))(SERVICE_NAME=XE))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
然而,我仍然得到那個抨擊錯誤
[[email protected] admin]# sqlplus SYSTEM/**********@XE
SQL*Plus: Release 11.2.0.2.0 Production on Fri Oct 9 12:58:36 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
我錯過了什麼? TIA
是你的數據庫的local_listener初始參數集? [你可能有這個問題](http://stackoverflow.com/a/21555172/266304)。 (並非真正相關,但你爲什麼以root身份執行此操作?) –
你引用的tnsnames.ora文件的位置是什麼?你是否試圖從同一臺機器連接到數據庫? –
tnsnames.ora位於$ ORACLE_HOME/network/admin中,其中ORACLE_HOME/u01/app/oracle/product/11.2.0/xe/network/admin。是的,我試圖從同一臺機器連接。 – PassoGiau