Based on this old thread :
You can develop a time-triggered function to invoke a stored procedure that integrates change tracking data from multiple tables where change tracking is enabled.
For example, assume change tracking (CT) is activated for the tables Product
, Order
, and Delivery
.
Create a stored procedure that compiles the data changes from these tables into a JSON-formatted message in one column and the table name in another column. The output of this stored procedure should be organized into a table with two primary columns:
-
ChangeContent
: Contains the JSON message detailing the changes. -
TableName
: Identifies the table where the changes occurred.
Additionally, you might include extra columns like ChangeOperation
to describe the type of change (insert, update, delete) if needed.