ORA-12541: TNS: 无监听程序
(特别感谢)参考链接:https://blog.csdn.net/qq_43540696/article/details/102522292
Traceback (most recent call last): File "D:\D01-software\D01010-PyCharm_community\PyCharm Community Edition 2020.1.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1438, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "D:\D01-software\D01010-PyCharm_community\PyCharm Community Edition 2020.1.3\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "E:/Data Mining/situational_awareness/or_eley_fee0608v1.py", line 32, in <module> data_read1 = connect_info.select_db(sql31) File "E:\Data Mining\situational_awareness\func0608v1.py", line 296, in select_db conn = self.conn() File "E:\Data Mining\situational_awareness\func0608v1.py", line 239, in conn
conn = cx_Oracle.connect(self.name, self.password, user_info)
cx_Oracle.DatabaseError: ORA-12541: TNS: 无监听程序
1. 检查服务是否开启
windows + R 输入Compmgmt.msc,然后回车
- OracleOraDb10g_home3TNSListener:服务监听程序(报上面弹框的原因就是因为没开启监听服务程序)
- OracleServiceORCL:数据库的主服务也叫实例,此服务的必须启动才能使用Oracle
发现服务开启了,但还是不行,那么就是Ip的原因了
2. ip的原因
重新配置oracle监听(一直下一步即可)