How Change Tracking On is
different from CDC?
Comparing Change Data Capture and Change Tracking
- Change Tracking is a
light-weight synchronous process designed to have very minimal impact on
DML operations whereas Change Data Capture is an asynchronous process
which reads the transaction log asynchronously in the background (also
minimal impact on the system) to track and record the DML changes.
- Since Change Tracking is a
synchronous process, change information is available immediately after a
commit whereas since Change Data Capture is an asynchronous process there
might be some delay in recording.
- Change Tracking only stores the
fact that some DML operations have happened (no recording of changed data)
whereas Change Data Capture stores both the fact that DML operations have
happened and also its related data along with complete history.
- Change Tracking has far less
storage requirements than Change Data Capture.
- Change Tracking does not
require SQL Server Agent to be running whereas Change Data Capture
requires SQL Server Agent to be running.
As shown in the following illustration, the changes that were made to user tables are captured in corresponding change tables. These change tables provide an historical view of the changes over time. The change data capture functions that SQL Server provides enable the change data to be consumed easily and systematically.

The following illustration shows a synchronization scenario that would benefit by using change tracking. In the scenario, an application requires the following information: all the rows in the table that were changed since in the last time that the table was synchronized, and only the current row data. Because a synchronous mechanism is used to track the changes, an application can perform two-way synchronization and reliably detect any conflicts that might have occurred.

|
Feature |
Change data capture |
Change tracking |
|
Tracked changes
|
|
|
|
DML changes
|
Yes
|
Yes
|
|
Tracked information
|
|
|
|
Historical data
|
Yes
|
No
|
|
Whether column was changed
|
Yes
|
Yes
|
|
DML type
|
Yes
|
Yes
|
No comments:
Post a Comment