解决方案:
修改listener.ora文件内容。
路径:盘符:\oracle\product\10.2.0\db_1\network\ADMIN\
打开文件:
# listener.ora Network Configuration File: D:\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 = D:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = CLR-PC)(PORT = 1521)) ) )
在SID_LIST_LISTENER 项添加
(SID_DESC = (GLOBAL_DBNAME = CLR) (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) (SID_NAME = CLR) )
添加后变为:
# listener.ora Network Configuration File: D:\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 = D:\oracle\product\10.2.0\db_1) (PROGRAM = extproc) ) (SID_DESC = (GLOBAL_DBNAME = CLR) (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) (SID_NAME = CLR) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = CLR-PC)(PORT = 1521)) ) )
SID_NAME和GLOBAL_DBNAME 要换成你自己的库。
然后重启OracleOraDb10g_home1TNSListener 服务,就ok了,测试可行。