Exclude TRACK_COLUMNS_UPDATED option for CHANGE_TRACKING
icnatejackson
Posts: 4
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)
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
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
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>
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.
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: