Competition: What’s your favorite Redgate tool? Enter now.

SDC5 Trying to drop the same constraint multiple times?

lund0529lund0529 Posts: 9
Running against two SQL Server 2K databases, I get an error that [DataTransmission_DataOrigin_FK1] is not a constraint. When I examine the SQL, I notice that SDC is trying to drop the same constraint over and over again, so presumably it works the first time, and the second time, the constraint no longer exists. It doesn't do it for all tables. Anyone seen this before? v5.2.0.40.

-- Drop constraint DataType_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataType_DataOrigin_FK1]

-- Drop constraint DataTransmission_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataTransmission_DataOrigin_FK1]

-- Drop constraint DataTransmission_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataTransmission_DataOrigin_FK1]

-- Drop constraint DataTransmission_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataTransmission_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

-- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

Comments

  • Close to same thing on v5.3.0.68...

    -- Drop constraint DataType_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataType_DataOrigin_FK1]

    -- Drop constraint DataType_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataType_DataOrigin_FK1]

    -- Drop constraint DataTransmission_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataTransmission_DataOrigin_FK1]

    -- Drop constraint DataTransmission_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataTransmission_DataOrigin_FK1]

    -- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]

    -- Drop constraint DataFrequency_DataOrigin_FK1 from [dbo].[DataOrigin]
    ALTER TABLE [dbo].[DataOrigin] DROP CONSTRAINT [DataFrequency_DataOrigin_FK1]
  • Hi,

    Thanks for highlighting this issue. Is there anything different for the tables that this is happening on, compared to the ones where it's not?

    It would be a great help if you could help us narrow this down, ideally by providing us with a simple case so we can reproduce this in-house.

    Thanks & regards,

    David
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.