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))
        )
    )