ORA-12514: TNS: 監聽程序當前沒法識別鏈接描述符中請求的服務
在安裝完Oracle10g後,使用PL/SQL工具鏈接,提示以下的問題:
ORA-12514: TNS: 監聽程序當前沒法識別鏈接描述符中請求的服務
解決辦法是手動修改監聽配置文件:
# listener.ora Network Configuration
File: d:\oracle\product\10.2.0\client_1\network\admin\listener.ora
# Generated
by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = d:\oracle\product\10.2.0\client_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = G:\oracle\product\10.2.0\db_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(
KEY = EXTPROC0))
)
)
其中紅色粗體部分是添加部分。
以上是在一臺機器上既安裝了Oracle服務器,又安裝了客戶端的狀況。
下面是僅僅在一臺機器上安裝了服務器,而且是在服務器本機上安裝PLSQL使用Oracle數據庫的狀況:
# listener.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
(PROGRAM = extproc)
)
(SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = E:\oracle\product\10.2.0\db_1) (SID_NAME = ORCL) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) )