Forum Stats

  • 3,767,820 Users
  • 2,252,720 Discussions
  • 7,874,337 Comments

Discussions

Write my own Pure Python Oracle DB Module?

TaylorSMarks
TaylorSMarks Member Posts: 2
edited Feb 22, 2016 7:07PM in Python

I'd like to get my Python application to send a few commands to an Oracle DB.

As often ends up being case when it comes to Windows and Python modules written in C, cx_Oracle isn't installing properly. Even when I install it with the wheel, I'm still getting a

ImportError: DLL load failed: %1 is not a valid Win32 application.

Even if cx_Oracle were to suddenly work, the requirements list would strike me as too long and fragile.

So I'd like to write my own Pure Python Oracle DB module instead. I'm not planning on implementing everything in it - just some basic CRUD. Does anyone know where the protocol is documented? Or has anyone else already done (or started) something similar?

Best Answer

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,643 Employee
    edited Feb 21, 2016 9:09PM Accepted Answer

    The Oracle Net protocol isn't published.


    Stick with cx_Oracle.  Check that PATH has the Oracle client libraries, e.g. Instant Client.  And that those libraries are the version used to build cx_Oracle.  And that those libraries are the correct 32 or 64-bitness

Answers

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,643 Employee
    edited Feb 21, 2016 9:09PM Accepted Answer

    The Oracle Net protocol isn't published.


    Stick with cx_Oracle.  Check that PATH has the Oracle client libraries, e.g. Instant Client.  And that those libraries are the version used to build cx_Oracle.  And that those libraries are the correct 32 or 64-bitness

  • TaylorSMarks
    TaylorSMarks Member Posts: 2
    edited Feb 22, 2016 9:57AM

    I'm now able to import the cx_Oracle properly... it was necessary to install the 32 bit version of the instant client, since my Python install is 32 bit.


    It appears a 64 bit version of the server and 32 bit version of the instant client can peacefully co-exist.

    I'll just write a wrapper which can automatically handle downloading and installing both the wheel and the Instant Client...

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,643 Employee
    edited Feb 22, 2016 7:07PM

    I'm glad you are up & running.  Can you share your wrapper?

This discussion has been closed.