1

I have tried connecting exadata from python using cx_Oracle, but faced issue stating

cx_Oracle.DatabaseError: DPI - 1047: Cannot locate a 64bit Oracle client library.

I am trying to install a 64bit cx_Oracle, but I need to know can I connect from python to exadata.

Christopher Jones
  • 9,449
  • 3
  • 24
  • 48
Vishnu kanth
  • 11
  • 1
  • 5

2 Answers2

2

Follow the cx_Oracle Linux installation instructions. The piece you are missing is access to Oracle Client libraries. As noted in the other answer, using Instant Client is the way to go. You'll need the "Basic" or "Basic Light" package for Linux x86-64. If you don't know your character set requirement, then use "Basic". You can use the latest 19c version. This will let you connect to Oracle DB 11.2 and newer.

If you have root access (?) you may find the RPM packages easier. If you want to use ZIP files, unzip the package, set your LD_LIBRARY_PATH environment variable to the directory, and run Python.

In your cx_Oracle scripts you use the same database credentials and connection string that you would use in SQL*Plus.

Christopher Jones
  • 9,449
  • 3
  • 24
  • 48
1

Welcome to Stack Overflow!

For the record, Oracle Exadata is a platform consisting of hardware and software designed for extreme Oracle Database performance. cx_Oracle is the Python client library to operate on an Oracle Database - hence you want to connect to an Oracle Database utilizing the Python programming language.

cx_Oracle depends on OCI (Oracle Call Interface). You need to download and install Oracle Client Library on your workstation before you can do import cx_Oracle from within Python.

You will find the Oracle Client Library here

Best of luck!

Christopher Jones
  • 9,449
  • 3
  • 24
  • 48
Bjarte Brandt
  • 4,191
  • 2
  • 23
  • 25