0

I need to export a subset of an Oracle table and import it in another Oracle instance. The export using expdp works pretty well but when I try to import the data in the other instance using impdp tool it fails because there are dependencies (foreign keys) missing. Is there any option to force expdp tool to export all required dependencies as well?

user1225775
  • 253
  • 5
  • 14

1 Answers1

1

no.

You should makie sure your dump set is complete. What you could try is to use impdp to generate the sql file, apply the generated sql to the other database to only create the table[s]. For this you might need to do some edit work on the generated sql until it fits your task.

Next use impdp with contents=data_only to import the rows in the pre-create table[s]

  • I already have an empty database with all the tables, constraints, procedures, ... I only want to import the data but this fails because of missing dependencies. – user1225775 Aug 24 '12 at 06:09
  • Of course they are there with a reason - therefore it wouldn't be a good idea to disable them. – user1225775 Aug 24 '12 at 09:04
  • If it is only about a few tables you could try to export the rows you need based on a query that selects the referenced rows. Here is a nice example –  Aug 24 '12 at 09:13
  • Yes, I already feared that there is no other solution than writing a query for every table. Anyway, thanks for your help. – user1225775 Aug 24 '12 at 21:08
  • glad that I could help. Sorry that the answer is not the one you were hoping for. –  Aug 25 '12 at 06:48