What is the order to turn off the constraints and index

Hi, I need to make some out of constraints and indexes on tables to load quite a date in them. I know that I can just drop them and recreate later. But is it feasible to figure who forced and in what order must be do disable or unusable before a load and after the load that is to say. without dropping to preserve? R before P data loading, and then P before R like I think that controls can jump in evertytime and are quite safe to deal with. But I did not carefully think about more, maybe you have some scripts that say exactly what should be the order to turn off the coast and later on this subject.

Thank you!

Hello

946279 wrote:

Hi, I need to make some out of constraints and indexes on tables to load quite a date in them. I know that I can just drop them and recreate later. But is it feasible to figure who forced and in what order must be do disable or unusable before a load and after the load that is to say. without dropping to preserve? R before P data loading, and then P before R like I think that controls can jump in evertytime and are quite safe to deal with. But I did not carefully think about more, maybe you have some scripts that say exactly what should be the order to turn off the coast and later on this subject.

Thank you!

That's right: disable foreign key constraints before disabling the primary (or Unique) key constraint correspondent.  When you reactivate them, re - enable the constraint of primary (or Unique) key before the corresponding foreign key constraints.

Aside from that, the order should not issue.

Tags: Database

Similar Questions

Maybe you are looking for