方法1:
a、通过oracle 工具 Net Configuration Assistant 重新配置监听,注意如果有双网卡请配置第一块网上IP。如何知道哪一块是一块网卡,可以通过ipconfig命令查看最上面的ip就是一块网卡的
b、通过Net Configuration Assistant 工具配置 “本地net服务名配置” 配置连接字串,
重新起动电脑,再连接
如果上以方法还是不行请试试讲法2
方法2:
打开oracle安装目录下的d:Oracleproduct11.2.0dbhome_1 etworkadminlistener.ora 文件
按如下格式修改
#Generated by Oracle configuration tools. SID_LIST_LISTENER= (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME =d:Oracleproduct11.2.0dbhome_1) (SID_NAME = ORCL) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = d:Oracleproduct11.2.0dbhome_1) (PROGRAM = extproc) (ENVS ="EXTPROC_DLLS=ONLY:H:Oracleproduct11.2.0dbhome_1inoraclr11.dll") ) ) LISTENER= (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY =EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT = 1521)) ) ) ADR_BASE_LISTENER= d:Oracle
需要注意的是安装路径 根据实际情况配置(我安装的路径是d:Oracle)
再重新起动电脑再试。