Skill 2.4.7

Handle changes by using change event streaming (CES), change data capture (CDC), Change Tracking, Azure Functions with SQL trigger binding, or Azure Logic Apps

Key Concepts

Change Tracking records that a row changed (its primary key and the operation) but not the values, with low overhead; clients call CHANGETABLE(CHANGES table, @last_version) and join back to the table for current values. Change data capture (CDC) reads the transaction log into change tables with the full before and after column values of each change, queried with cdc.fn_cdc_get_all_changes_<instance> or the net changes function, which suits auditing and ETL. Change event streaming (CES), in preview, pushes each INSERT, UPDATE and DELETE as a CloudEvent to Azure Event Hubs or Fabric Eventstream in near real time, so many consumers can process it without polling the database.

Azure Functions SQL trigger binding runs a function with batches of changed rows; it is built on Change Tracking, which must be enabled on the database and table, and keeps its state in lease tables. Azure Logic Apps uses the SQL Server connector's triggers, such as when an item is created or modified, which poll the table on a schedule and suit low-code workflows. Table triggers react synchronously inside the transaction and should only record work for later processing.