【问题标题】:Getting "cx_Oracle.DatabaseError: DPI-1050: Oracle Client library must be at version 11.2 or higher" error出现“cx_Oracle.DatabaseError: DPI-1050: Oracle Client library must be at version 11.2 or later”错误
【发布时间】:2018-10-08 14:45:30
【问题描述】:

我正在尝试使用 pycharm(3.3) 使用以下代码访问我的 Oracle SQL(11.2.0),但出现以下详细信息的错误。

使用的代码:

import cx_Oracle

connection = cx_Oracle.connect('uname/pwd@14@server')

收到错误

cx_Oracle.DatabaseError: DPI-1050: Oracle Client library must be at version 11.2 or higher

【问题讨论】:

    标签: python oracle11g pycharm


    【解决方案1】:

    我遇到了与您的问题非常相似的问题。我能够通过使用不同的连接方法来解决它:

    my_dsn = cx_Oracle.makedsn("host",port,sid="sid")
    connection = cx_Oracle.connect(user="user", password="password", dsn=my_dsn)
    cursor = connection.cursor()
    
    querystring = "SQL query"
    cursor.execute(querystring)
    

    更多信息请参见http://cx-oracle.readthedocs.io/en/latest/module.html

    【讨论】:

      猜你喜欢
      • 2020-04-28
      • 2019-02-08
      • 1970-01-01
      • 2022-11-16
      • 2023-02-07
      • 2019-09-28
      • 1970-01-01
      • 1970-01-01
      • 2015-07-18
      相关资源
      最近更新 更多