Oracle数据库连接失败
该问题的处理
:
找到Oracle的安装路径,每个人安装路径不同;
打开安装路径\app\product\11.2.0\dbhome_1\NETWORK\ADMIN
用记事本打开文件listener.ora
原文件如下:
# listener.ora Network Configuration File: E:\win10\360downno\app\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = E:\win10\360downno\app\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:E:\win10\360downno\app\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) ADR_BASE_LISTENER = E:\win10\360downno\app修改文件如下:
# listener.ora Network Configuration File: E:\win10\360downno\app\product\11.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ORCL) (ORACLE_HOME = E:\win10\360downno\app\product\11.2.0\dbhome_1) (SID_NAME = ORCL) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = E:\win10\360downno\app\product\11.2.0\dbhome_1) (PROGRAM = extproc) (ENVS = "EXTPROC_DLLS=ONLY:E:\win10\360downno\app\product\11.2.0\dbhome_1\bin\oraclr11.dll") ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) ) ) ADR_BASE_LISTENER = E:\win10\360downno\app修改后就OK了