So I am trying the new oracledb python library, which replaces cx_oracle - as I dont want to have to install the oracle instant client.
un = 'fred'
pwd = 'mypass'
host = 'server.mycompany.net'
port = 1521
service_name = 'servicea'
params = oracledb.ConnectParams(host=host, port=port, service_name=service_name)
with oracledb.connect(user=un,
password=pwd,
params = params
) as connection:
with connection.cursor() as cursor:
sql = "select * from dim_drug_product"
for r in cursor.execute(sql):
print(r)
And I just get this back:
File C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\oracledb\errors.py:103, in _raise_err(error_num, context_error_message, cause, **args) 101 message = f"{message}\n{context_error_message}" 102 exc_type = ERR_EXCEPTION_TYPES[error_num // 1000] --> 103 raise exc_type(_Error(message)) from cause
NotSupportedError: DPY-3012: national character set id 871 is not supported by python-oracledb in thin mode