Python and Oracle 19c

Post Reply

Topic author
tdirven
Member
Posts: 8
Joined: Wed Apr 01, 2020 9:11 am
Reputation: 0
Status: Offline

Python and Oracle 19c

Post by tdirven » Mon Jul 24, 2023 6:17 pm

With which python packages/modules can I access Oracle 19c database.
I want to run the python application on OpenVMS.

For Oracle Rdb it is working quite well.
Is it possible to run a Python application on OpenVMS and access Oracle 19c database?
What should I install?

//Toine

User avatar

arne_v
Master
Posts: 347
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Python and Oracle 19c

Post by arne_v » Mon Jul 24, 2023 7:36 pm

I suspect this may be a tricky one.

Python access to Oracle is usually via the cx_Oracle module that can be installed via PIP.

You can try if PIP works on your VMS system. But even if it does not then installing with PIP elsewhere and moving files to VMS has been know to work for other modules.

So far so good.

The problem is that cx_Oracle is not pure Python but is using Oracle native client. cx_Oracle require 11.2, 12c, 18c, 19c or 21c per documentation.

Those are not available on VMS. Only way older versions. And even those Oracle has announced EOL.

VSI's recommended solution for Oracle connectivity is SQLRelay aka:

application on VMS with SQLRelay client--->SQLRelay server on Linux or Windows--->Oracle database server

There should be a Python client for SQLRelay, but I have never heard of it being used on VMS (and I have worked with SQLRelay).
Arne
arne@vajhoej.dk
VMS user since 1986


Topic author
tdirven
Member
Posts: 8
Joined: Wed Apr 01, 2020 9:11 am
Reputation: 0
Status: Offline

Re: Python and Oracle 19c

Post by tdirven » Tue Jul 25, 2023 6:54 am

Hi Arne,

I also have Oracle 11 installed on my OpenVMS (Integrity) server.
Then it should work?

$ sqlplus username/password@dsw.world

SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 25 12:52:25 2023

Copyright (c) 1982, 2015, Oracle. All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

I will try it.

//Toine

User avatar

arne_v
Master
Posts: 347
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Online
Contact:

Re: Python and Oracle 19c

Post by arne_v » Tue Jul 25, 2023 7:39 pm

So you have a supported Oracle client. That is good news.

Now you can try to get cx_Oracle module installed.

First try PIP. As per:

https://cx-oracle.readthedocs.io/en/lat ... ation.html

If that doesn't work then it will be hard but still possible.

The source is available here:
https://github.com/oracle/python-cx_Oracle
and with the Oracle client available it should be possible to build.
Arne
arne@vajhoej.dk
VMS user since 1986

Post Reply