I am trying to connect Oracle datasource using Python in my remote machine. My python version and cx_Oracle details as follows,
here is my code to connect Oracle,
import cx_Oracle
dsn_tns = cx_Oracle.makedsn('host_name', 'port', service_name='service_name')
conn = cx_Oracle.connect(user='user', password='pws', dsn=dsn_tns)
c = conn.cursor()
c.execute('select * from DB.TABLE')
for row in c:
print(row[0])
conn.close()
Even python and Oracle are 32 bits, I am getting 32 bit Oracle client library issues.
Exception has occurred: DatabaseError
DPI-1047: Cannot locate a 32-bit Oracle Client library: "The specified module could not be found". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help
Can anyone please help me to resolve this issue?
Not really sure how to manage this in remote machine. If you suggest the commands to run on terminals it would be easy for me to deal in remote machine.
The issue fixed. I downloaded 32 bit Oracle Instant client files(zip) from the link https://www.oracle.com/in/database/technologies/instant-client/microsoft-windows-32-downloads.html (Basic package) and set the PATH in environment variables solved my problem.