Options

"Could not drop constraint" error - multiple drop statements

coalescecoalesce Posts: 15
Hi,

I've seen this problem posted a few times on this forum, but I have not seen whether there is a solution to it yet.

I am using SDC 5.3.0.68 to compare 2 SQL 2005 databases. They have the same schema (i.e. SQL Compare says all objects are identical).

I often use SDC to try and sync a development database with a production database. In this case, there are a number of tables with changes, and when I generate the script, the section to drop constraints (and recreate them at the end) contains several duplicate statements.

This statements occur in groups of multiple constraints that get repeated. In pseudo code:

drop constraint a
drop constraint b
drop constraint c
drop constraint a
drop constraint b
drop constraint c
drop constraint d
drop constraint a
drop constraint b
drop constraint c

If you would like to see examples of this, let me know what you need to see.

Thanks in advance,

Gareth

Comments

  • Options
    David AtkinsonDavid Atkinson Posts: 1,439 Rose Gold 2
    Hi Gareth,

    If you could supply us with enough information for us to reproduce this internally, we will ensure that it is fixed for the next release. The easiest way might be to supply us with a snapshot of your schema and tell us what steps were required to cause the error.

    You can send this info to David.Atkinson at red-gate.com

    Thanks!

    David Atkinson
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
  • Options
    Hi Gareth

    I've managed to replicate the issue. There appears to be an issue when changing the Disable DML trigger option between the compare and sync. I found that refreshing the comparison after changing the option solved the issue and can hopefully be used as a workaround.

    I have raised the issue in our internal bug-tracking system - hopefully it will be fixed in the next version of data compare.

    Many Thanks
    Chris
    Chris Spencer
    Test Engineer
    Red Gate
Sign In or Register to comment.