Question:
I have an ancient Oracle7 database (version 7.3.4.5.0) that I need to extract some data from.

I mainly work with Python, so naturally I started looking at oracledb. However, it looks like the oldest version of oracledb only supports Oracle 9 and up (got erro DPY-4011 when attempting a connection).

So I started looking at cx_Oracle instead. It looks like I should probably use cx_Oracle 3.0 or older.

However I can’t find any binary distributables for it. Are they available anywhere? If not, can I install it directly from PyPi somehow?

If all fails, is there any other way to write a script for Oracle7 (VBScript?, JScript?, VBA?) that’s documented?


Answer:

Try use SQLPlus, which can be used to extract data from Oracle7 directly. You could write scripts in SQLPlus to extract data, then use Python to process the exported data (e.g., CSV files).

An Example using python:

import subprocess

command = “sqlplus -S username/password@your_database @your_script.sql” subprocess.run(command, shell=True)

DIscussion: https://stackoverflow.com/questions/79243348/how-to-connect-to-an-oracle7-database/79252935#79252935