最近装了Oracle 10g,当我用pl/sql去连接的时候,经常报listener does not currently know of service requested in connect descriptor错误
解决方法:
在listener.ora文件中添加以下内容: (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) (SID_NAME = orcl) ) 注意:orcl为数据库名,D:\oracle\product\10.2.0\db_1为$ORACLE_HOME的路径,修改后的listener.ora文件内容如下: # listener.ora Network Configuration File: e:\oracle\product\10.1.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.1.0\Db_1) (PROGRAM = extproc) ) (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) (SID_NAME = orcl) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = linewell-d29e66.mshome.net)(PORT = 1521)) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) ) )