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

和自甴很熟 提交于 2019-12-18 07:24:33

问题


I am trying to use pycharm(3.3) to access my Oracle SQL(11.2.0) using the below codes but getting error with below details.

Code used:

import cx_Oracle

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

Error received

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

回答1:


I had an issue very similar to yours. I was able to solve it by using a different connection method:

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)

See http://cx-oracle.readthedocs.io/en/latest/module.html for more information



来源:https://stackoverflow.com/questions/49450646/getting-cx-oracle-databaseerror-dpi-1050-oracle-client-library-must-be-at-ver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!