通常按网上各贴所言,配置对listener.ora和tnsnames.ora即可。然而我耐心的比较了几个小时- -,也没发现有什么不对的地方。
重点是这里
注意到了吗。监听的名字不知道什么时候变成了ORACLEOraDb11g_home1TNSListenerLISTENER1!(可能是使用oracle自带工具重新配置监听导致的)这意味着,此时listener.ora的配置需要相应调整如下:
# listener.ora Network Configuration File: D:\ORACLE\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. LISTENER1 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = che-PC)(PORT = 1521)) ) ) SID_LIST_LISTENER1 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME =D:\Oracle\product\11.2.0\dbhome_1) (SID_NAME = ORCL) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = D:\ORACLE\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:D:\ORACLE\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) )
LISTENER1和SID_LIST_LISTENER1都应该与服务名对应。
原文链接:/oracle/206920.html