【发布时间】:2017-09-10 08:02:00
【问题描述】:
我是 python 环境的新手。我尝试根据安装指南在 Windows 8.1 中安装 cx_Oracle(https://www.cs.utexas.edu/~scohen/cs327e_spr15/cx_Oracle/windows.html, easy_install cx_Oracle (python package) on Windows)
当我尝试与 cx_Oracle 连接时,我遇到了错误“ORA-12170 TNS:发生连接超时”、“cx_Oracle.DatabaseError: ORA-12541: TNS:no listener”。为什么会发生此错误。有没有人帮帮我。
我不明白我的问题有什么问题。除了将我的问题投票为否定之外,请指导我错了什么。我完全无助。
对于 ORA_12170 (ORA-12170: TNS:Connect timeout occurred),我无法发出 lsnrtcl 状态。 对于 ORA_12541 (Oracle client ORA-12541: TNS:no listener),我找不到(控制面板 -> 管理工具 -> 服务 ->oracle)oracle 正在运行。
【问题讨论】:
-
你使用的连接字符串是什么?
-
import cx_Oracle con = cx_Oracle.connect('pythonhol/welcome@ip-address/databasename')