What are the challenges you face when working across database platforms? Take the survey
Options

Exclude TRACK_COLUMNS_UPDATED option for CHANGE_TRACKING

icnatejacksonicnatejackson Posts: 4
edited March 15, 2011 8:56AM in SQL Compare Previous Versions
When I compare my DB against a script, all of the tables that have change tracking enabled end up having a conflict. How can I exclude the TRACK_COLUMNS_UPDATED option??

Here is how my DB and script are defined:

DB:
ALTER TABLE [dbo].[MyTable] ENABLE CHANGE_TRACKING

SCRIPT:
ALTER TABLE [dbo].[MyTable] ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON)

Comments

  • Options
    jchertudijchertudi Posts: 13 Bronze 2
    I have a very similar issue, using SQL Compare 8.5. On a Full Text Indexed View I have set

    ALTER FULLTEXT INDEX ON [ViewName]
    SET CHANGE_TRACKING AUTO

    But when I compare this to a similar database that has

    ALTER FULLTEXT INDEX ON [ViewName]
    SET CHANGE_TRACKING MANUAL

    the Compare does not recognize them as different. I see this in the compare preview:a

    CREATE FULLTEXT INDEX ON [dbo].[ViewName] KEY INDEX [IX_ID] ON [Storage] WITH CHANGE_TRACKING OFF
  • Options
    I've submitted my issue as a bug.

    DB Script:

    CREATE DATABASE [CT_DB_TEST];
    GO
    ALTER DATABASE [CT_DB_TEST] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 30 DAYS, AUTO_CLEANUP = ON);
    GO
    USE [CT_DB_TEST];
    GO
    IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
    GO
    CREATE TABLE [dbo].[Table1](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [Col1] [int] NOT NULL,
    CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED
    (
    [Id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    ALTER TABLE [dbo].[Table1] ENABLE CHANGE_TRACKING WITH(TRACK_COLUMNS_UPDATED = OFF)
    GO

    When I use SQL Compare to compare that script to the DB it generates, SQL Compare comes up with this difference:

    <line type="different">
    <left>ALTER TABLE [dbo].[Table1] ENABLE CHANGE_TRACKING</left>
    <right>ALTER TABLE [dbo].[Table1] ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON)</right>
    </line>
  • Options
    For all interested, redgate has acknowledged the bug:

    We have been able to recreate the behavior that you have seen. I have therefore been able to raise a bug report, reference: SC-5024.
  • Options
    Matthew_SontumMatthew_Sontum Posts: 26 Bronze 1
    Has this been resolved? I am using SQL Compare 13 and I still have a similar issue. In my database project I have the line:

    ALTER TABLE [dbo].[Person] ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = OFF);

    And yet in the comparison it displays as:

    ALTER TABLE [dbo].[Person] ENABLE CHANGE_TRACKING WITH (TRACK_COLUMNS_UPDATED = ON)

    And is thus a conflict when compared against the database, where it lists the ALTER statement as:

    ALTER TABLE [dbo].[Person] ENABLE CHANGE_TRACKING


Sign In or Register to comment.