DwayneHart
DwayneHart

Reputation: 129

Running a Python Script in 32 Bit on 64 linux machine to connect to oracle DB with 32 bit client

I am trying to set up a cronjob that executes a python (3.6) script every day at a given time that connects to an oracle 12g database with a 32 bit client (utilizing the cx_Oracle and sqlalchemy libs). The code itself was developed on a win64 bit machine.

However, when trying to deploy the script onto an Ubuntu 16.04 server, I run into a dilemma when it comes to 32 vs 64 bit architectures.

The error I receive at this moment when trying to run the python script refers to the absence of an oracle client (DPI-1047). However, I already encountered a similar problem in windows when it was necessary to switch the python version to the 32 bit version and to install a 32 bit oracle client.

Is this also necessary in the ubuntu case or are there similar measurements needed to be taken? and if so, how do I get ubuntu to install and run python3.6 in 32 bit as well as the oracle client in 32 bit?

Upvotes: 0

Views: 891

Answers (1)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59523

I am a bit confused about your question but this should give some clarification:

  • A 32-bit client can connect to a 64-bit Oracle database server - and vice versa
  • You can install and run 32-bit applications on a 64-bit machine - this is at least valid for Windows, I don't know how it works on Linux.
  • Your application (the python in your case) must have the same "bitness" as installed Oracle Client.

Upvotes: 4

Related Questions