"Export User Objects" creates objects in wrong order and fails creating foreign keys then

Bernhard S

Member³
I exported schema objects via "Export User Objects" with "Single file". Some child tables get created before their parent tables and the foreign key created right after the child tables result then in an error complaining about the missing parent table:
ORA-00942: table or view does not exist
In PL/SQL Developer 9.0.5 the order was fine still. Looks like 9.0.6 uses a different algorithm how to create the order of schema objects and something is wrong in there.
 
This problem still exists with v10 too. I have like circular FKs, but not all in the same direction, like tables A, B, C, D with following FKs:
D->C->B->A
and A->D
A gets created with all its FKs including the one pointing to D before tables B,C, and D. Of course all those FKs fail then since target table D is not yet existing. I think the problem of PSD is that it always keeps FK generations with the Child table generation. In such a circular case however you won't find any table order that works. The only option is to separate table and FK generation and to create FKs never before the target table is created.
 
Back
Top