Toad World® Forums

Data Compare Drop/Create primary keys and unique contraints option

Hi,

We are using the trial version V6.7.0.176 and we have encountered an issue with the generated script when we perform data compare between two databases.

If we select the “Drop/Create primary keys and unique constraints” option the generated script has only drop constraint statement for tables that are synchronized.

The issue is that they may exist other tables with foreign key constraint on the tables that the primary key constraint will be dropped and the drop of those constraints is not in the script because those tables have not been selected for synchronization.

So when we try to execute the script we are taking an error as below:

The constraint <PK_constraint> is being referenced by table <foreign_key_table>, foreign key constraint <foreign_key_contraint>.

Can you please advise if there is a workaround for that?

Thanks for your support.

Hi,

Sorry for your inconvenience. For now, we have to drop the constraint fist manually and Add it back again.

Kelly