constraints during migration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

constraints during migration

satish
Dear Erman,

DEV team requested to perform export and import of 10 schemas from prod to uat instance.They said they have some order of export and import but they didnt provide any order in which schemas has to be exported or imported.This is to avoid foreign key/unique key violations.

Could you please help us if there is any way to check which order we can follow to export and import of schemas?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: constraints during migration

ErmanArslansOracleBlog
Administrator
Read this-> https://docs.oracle.com/database/121/SUTIL/GUID-47D52BE2-72CD-47E7-B4EE-462F5AF4ABA0.htm
 
Ref :Oracle

Manually Ordering the Import
When the constraints are reenabled after importing, the entire table is checked, which may take a long time for a large table. If the time required for that check is too long, then it may be beneficial to order the import manually.

To do so, perform several imports from an export file instead of one. First, import tables that are the targets of referential checks. Then, import the tables that reference them. This option works if tables do not reference each other in a circular fashion, and if a table does not reference itself.
Sri
Reply | Threaded
Open this post in threaded view
|

Re: constraints during migration

Sri
Dear erman,

If there is any cross dependencies between schemas,then is there any query which tell us the order of import of schemas?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: constraints during migration

ErmanArslansOracleBlog
Administrator
Yes, you can write your own.
you will query dba_dependencies.
Check this one -> http://www.dba-oracle.com/t_tracking_table_constraint_dependencies.htm