is the order of tables relevant when importing from oracle dump?

1.5k views Asked by At

I am trying to import specific tables from an oracle dump, in order to avoid any parent key not found exception, I want to follow a certain order to import the tables. For example if tables X depends on tables A and B, I want to import A and B first:

imp user/pass@dbName tables=(A,B,X) rows=y ignore=Y 

Will this command guarantee that A and B are imported before X?

1

There are 1 answers

2
AudioBubble On BEST ANSWER
exp userid=ronr tables=COMM_SCHEDULE_DELIVERY,COMM_SCHEDULE_DETAIL,COMM_SCHEDULE_HEADER file=z.dmp
...
...

imp userid=imp fromuser=ronr touser=imp tables=COMM_SCHEDULE_HEADER,COMM_SCHEDULE_DETAIL,COMM_SCHEDULE_DELIVERY file=z.dmp
Import: Release 11.2.0.3.0 - Production on Tue Aug 7 16:53:34 2012

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Password: 

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes

Export file created by EXPORT:V11.02.00 via conventional path

Warning: the objects were exported by RONR, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
. importing RONR's objects into IMP
. . importing table       "COMM_SCHEDULE_DELIVERY"          0 rows imported
. . importing table         "COMM_SCHEDULE_DETAIL"          0 rows imported
. . importing table         "COMM_SCHEDULE_HEADER"          0 rows imported
Import terminated successfully without warnings.

No, the order specified on imp does not guarantee the order in which the tables are imported, it is done in the order in which they are exported.