2

When I try to export and then import many schemas from one Oracle DB to another one, I get errors because grants and synonyms cannot be recreated in the target DB; the reason is probably that the schemas are not imported in the right order.

So :

  • With impdp, is it possible to define the order in which the schemas are to be imported ?
  • If not (and I think that impdp simply uses the order in which the schemas were found in the dump file) : is it possible during the expdp to define the order in which the schemas are to be exported ?
2
  • 1
    As far as I know it is not possible, one solution could be doing the import in different steps. EG impdp shema=x, impdp schema=y, ... Only full=y will give you all the grants that you need. I generally precreate a grant script for the schema's I'm exporting.
    – Munchi
    Dec 4, 2013 at 12:58
  • 1
    If those are system privilege grants, then you have to manage them yourself, as they are not included in schema level expdp. For synonyms, check privileges in target db to see the schema owners have same privileges as in source. You don't need to order, it does not seen to be a order issue.
    – Raj
    Dec 4, 2013 at 16:43

1 Answer 1

1

You have no direct control over the order on objects creation. Anyway, you can try to perform a full export, and then, run an impdp only of the schemas you need. For example:

expdp system/**** full=y directory=<dir> dumpfile=<dumpfile>

and then import all the schemas you want (in the order you need):

impdp system/**** directory=<dir> dumpfile=<dumpfile> schemas="schema1, schema2, .. , schemaN"

I have not done a test, but you can give it a try.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.