0

I have been using 32 bit Python 3.6 and connecting to an oracle database by using the 32 bit oracle instant client.

My current project requires me to use a 64 bit python 3.8 as I need to use different libraries. This means using oracle instant client 64 bit if I want to use CX oracle.

My worry is that i might run into issues installing both. Has anyone installed both 32 and 64 bit versions and can run both instances of CX oracle with no issues?

I have not installed it on my system as I require approvals from my workplace. I am also worried that the downloads may be placed in locations that I am not aware of and I would not be able to fix it should I install both versions.

Based on questions I've seen, oracle client doesn't do well with both 32 and 64 bit, but no mention of oracle INSTANT client.

Edit: I have tried using python-oracledb but my login faced the issue of case_sensitive_logon being set to False. To resolve this I would have to use the thick driver which requires instant client based on the documentation I have read, which leads me back to the same problem.

Chowder
  • 96
  • 1
  • 7

1 Answers1

0

Instant Client ZIP files can be installed into any subdirectory you like. You can install 32-bit and 64-bit into different locations on the same machine. At runtime you will need to set the library search path to the appropriate Instant Client directory for the tool you want to run. For example on Windows you would need to set PATH. On Linux you would need to set LD_LIBRARY_PATH. Often this can be done in a batch or shell script that also invokes your tool or program.

As noted in comments, the latest version of cx_Oracle, now called python-oracledb, doesn't necessarily need Instant Client, so you should/could consider upgrading. See the python-oracledb release announcement.

Christopher Jones
  • 9,449
  • 3
  • 24
  • 48
  • Tried python oracledb but i came across the issue of my login not being able to work because of some [password case_sensitive_logon being set to False](https://stackoverflow.com/questions/73853023/dpy-3015-password-verifier-type-09x939-is-not-supported-by-python-oracledb-in-t). Cx_oracle did not face this issue hence my question, unless you know of a workaround for this? Otherwise I would have to install oracle instant client 64 bit to get access to thick mode based on what i have read. – Chowder Feb 24 '23 at 05:36
  • For the downloading of both clients into different locations and setting the paths, can you specify how exactly I should be setting things up? Currently, I have the system variable `ORACLE_HOME` with a value of `C:\Oracle\Client\19.3.0_32` (this is the 32 bit instant client version). What should the 64 bit version be named and is it ok if it were placed in the same Client folder? My user PATH actually does not include the client directory so thats another thing im unsure of. Errors do lead to the correct folder when I run things on Python though. – Chowder Feb 24 '23 at 05:48
  • When using Instant Client, don't set ORACLE_HOME. You should unzip the Instant Client packages into two different directories (since they contain files with similar names). You can choose where these directories are. – Christopher Jones Feb 24 '23 at 20:48
  • There are various solutions to your less secure password setting issue, the most obvious being to upgrade. The other solution is to run in Thick mode, which is equivalent to how cx_Oracle works. I added some steps to https://stackoverflow.com/a/75561308/4799035 – Christopher Jones Feb 24 '23 at 20:56
  • Thank you, both will require me to get permissions but I'm guessing the 2 clients option seems more doable (I reckon messing with production DB might require bigger people...). 1. If I don't change the `ORACLE_HOME`, could I still just set the 64bit instant client for oracledb as long as the locations of both instant clients are not the same? Especially since the [docs](https://python-oracledb.readthedocs.io/en/latest/user_guide/installation.html#configure-oracle-instant-client) here say you can specify the directory. 2. Would this have any repercussions to `cx_oracle`? – Chowder Feb 26 '23 at 10:55