V2008 R2 - Change Tracking

  • When we insert a row the I (insert) operation is in the tracking table. When we update this same row moments later, no U (update) operation shows in the tracking table. Updates to older rows appear fine in the tracking table so we know update operations are hitting it.

    We have been able to duplicate this behavior several times. At first blush we thought that the updates were not hitting change tracking at all but that isn't the case.

    If is critical that we be able to capture all changes within a short amount of time.

    Why is this happening and what can we do about it?

    Thanks,

    Paulette

  • I'd direct you to http://technet.microsoft.com/en-us/library/bb933875%28v=sql.105%29.aspx.

    My understanding of Change Tracking (and Change Data Capture) is that the logging portion is handled by a set of procedures and agent jobs which are instantiated when CT is activated on a table. There can be a gap between when the DML is committed to the database and the updates are logged in the change table. Admittedly CT is not a forte of mine, but if you need the changes to be logged as soon as they're committed to the database, you may consider handling the the logging in stored procedures or with the use of triggers so that you can wrap both the DML statement and the logging activity in the same transaction.

    Executive Junior Cowboy Developer, Esq.[/url]

  • Thank you for quick response.

    The link you referenced is an over view of Change Tracking (CT).

    I have been monitoring and testing and coding against it for the past week. Our final round of testing is what brought this issue to light.

    We have found so far that the changes hit the tracking table very quickly.

    This is the only issue so far that we have discovered but unfortunately it is one we have to get past.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply