Problem solve Get help with specific problems with your technologies, process and projects.

Can I change the import order of tables in a dump file?

A SearchOracle.com member asks, "Can I change the order in which a table gets imported in a dump file?"

I have an exported dump file available with me. This dump file consists of tables which have referential integrities among themselves. When I am doing an import, the parent table is getting populated but not the child table. In the log file I can see that the child table is getting imported first. What can be the issue? Can we change the order in which the table gets imported?
The order of import should not matter since Oracle does not create the referential integrity constraints until after all data is imported. This means you can import child records before parent records. After all records are imported (child and parent), the referential integrity constraint will get created.

You cannot change the order the tables are imported. Oracle's import utility will import the tables in the order they were exported. Oracle's export utility will export the tables in alphabetical order for each schema.

That being said, you can import one table's records at a time with the TABLES parameter for the imp utility. So you do have some control. But you will have to run the imp utility for each table if you want to control the import order. So if you have 20 tables to import, you will be running imp 20 times.

Dig Deeper on Oracle database administration

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.