Django inspectdb for Oracle

I am doing a project and need retrieve tables/models from a Oracle database(version 19c). So I am trying to use Django ‘inspectdb’ to do this.

– my looks like:

import cx_Oracle

‘default’: {
‘ENGINE’: ‘’,
‘NAME’: ‘service name’,
‘USER’: ‘XXX’,
‘HOST’: ‘’,
‘PORT’: ‘’,
‘threaded’: True,
‘use_returning_into’: False,


– Running these followings in shell are all good:

import cx_Oracle

dsn_tns = cx_Oracle.makedsn(‘Host Name’, ‘Port Number’, service_name=‘Service Name’)
conn = cx_Oracle.connect(user=‘User Name’, password=‘Personal Password’, dsn=dsn_tns)
c = conn.cursor()
c.execute(‘select * from schema.table’)

for row in c:
print (row)

Issues: But when I try using : python3 inspectdb schema.table

It returns error : "The error was: ORA-00942: table or view does not exist "

Could anyone help me? thanks alot!

Back to Top