Home > Uncategorized > Enable Change Tracking (SQL2008R2) Part 1

Enable Change Tracking (SQL2008R2) Part 1


Change tracking in SQL Server 2008 enables applications to obtain only changes that have been made to the user tables, along with the information about those changes. With change tracking integrated into SQL Server, complicated custom change tracking solutions no longer have to be developed.

Change tracking is an important building block for applications that synchronize and replicate data in scenarios in which end-to-end replication solutions do not work and a custom solution is required.

For example, a scenario that requires synchronizing data with data stores that are not SQL Server databases or in which the store schemas are very different.`


Enable Change tracking at Database Level.



Change Tracking

Use to enable or disable change tracking for the database.

To enable change tracking, you must have permission to modify the database.

Setting the value to True sets a database option that allows change tracking to be enabled on individual tables.

You can also configure change tracking by using ALTER DATABASE.

Retention Period

Specifies the minimum period for keeping change track information in the database. Data is removed only if the Auto Clean-Up value is true.

The default value is 2.

Retention Period Units

Specifies the units for the Retention Period value. You can select Days, Hours, or Minutes. The default value is Days.

The minimum retention period is 1 minute. There is no maximum retention period.

Auto Clean-Up

Indicates whether change tracking information is automatically removed after the specified retention period.

Enabling Auto Clean-Up resets any previous custom retention period to the default retention period of 2 days.






Enable Change tracking at Object Level.



Change Tracking

Indicates whether change tracking is enabled for the table. The default value is False.

This option is available only when change tracking is enabled for the database. For more information, see Database Properties (ChangeTracking Page).

To enable change tracking, the table must have a primary key, and you must have permission to modify the table.

You can also configure change tracking by using ALTER TABLE.

Track Columns Updated

Indicates whether the SQL Server Database Engine tracks which columns were updated.







Will cover about internals of Change Tracking with important catalog views in next post.










Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: