新装的oracle11g在没有做任何配置的情况下用工具连接报ORA-12514: TNS :no listener。解决方法如下:
1. 进入 Oracle 安装目录下的 dbhome_1\NETWORK\ADMIN 目录下,将 listener.ora文件内的 HOST 项的值修改为当前计算机的全名(计算机系统属性中查看 Oracle 服务端计算机的全名)
2. 修改后重启监听lsnrctl stop, lsnrctl start
3. 若继续报错ORA_12514:TNS:listener does not currently know of service requested in connect descriptor,在listener.ora添加红色字体部分:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = E:\app\product\11.2.0\dbhome_1)
(SID_NAME = orcl)
)
)
4. 重启监听,可正常连接
————————————————
版权声明:本文为CSDN博主「babyHuQi」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/MissQi0408/article/details/90166840