I'm writing a generic drop-all-objects script for our Oracle databases. It generates
drop table TABLE_NAME cascade constraints purge lines for all tables, amongst other object types, by looping through
The problem is that tables which are have reference-partitioned tables dependent on them can't be dropped in this way:
ORA-14656: cannot drop the parent of a reference-partitioned table.
How can I detect which tables are the parents of reference partitioned tables from the data dictionary, so I can skip them in the first loop, and drop them in a second loop?