This is potentially very useful if you are intending to use Change Tracking. It is possible to set a context (”hey, all these changes were done as part of this process”). This can easily be done by
DECLARE @originator_id varbinary(128);
SET @originator_id = CAST(‘SSIS’ AS varbinary(128));
WITH CHANGE_TRACKING_CONTEXT (@originator_id)
UPDATE MyTable
SET MyLocationId = 1100
WHERE MyId = 634
I say potentially because there is a drawback.. if there is another update before you bring back the changes , it’s change context is wiped.

No comments yet
Comments feed for this article