Change Event Streaming
This lesson explains how change event streaming pushes row changes to Event Hubs, how to configure it and its limits.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what change event streaming sends and where.
- Identify the configuration steps and procedures.
- Explain the limitations and operational risks of CES.
What CES does
CES, currently in preview in SQL Server 2025, Azure SQL Database, Azure SQL Managed Instance and SQL database in Fabric, captures INSERT, UPDATE and DELETE changes on selected tables and sends each as a CloudEvent, serialized as JSON or Avro, to Azure Event Hubs or Fabric Eventstream. Events include the operation, the current schema and the old and new values. Unlike Change Tracking and CDC, consumers do not poll the database: many independent consumers, such as microservices, analytics, search indexers or an embedding pipeline, read the same stream from Event Hubs, and the database is decoupled from them.
The following diagram shows change events fanned out to consumers.

Configuring CES
Configuration uses system stored procedures, as the following steps show.
-
Prepare Event Hubs
Create an Event Hubs namespace and event hub, and grant the database's managed identity the Azure Event Hubs Data Sender role on that event hub (or use a Send shared access policy).
-
Create credentials
Create a database master key and a database scoped credential with IDENTITY = 'Managed Identity'.
-
Enable streaming
Run
EXEC sys.sp_enable_event_streamin the database (SQL Server 2025 also needs PREVIEW_FEATURES). -
Create a stream group
Run
sys.sp_create_event_stream_groupwith the destination type, location (namespace host, port 9093 and event hub), credential, maximum message size and partition key scheme. -
Add tables
Run
sys.sp_add_object_to_event_stream_groupfor each table to stream.
EXEC sys.sp_enable_event_stream;
EXEC sys.sp_create_event_stream_group
@stream_group_name = N'CatalogChanges',
@destination_type = N'AzureEventHubs',
@destination_location = N'contoso-events.servicebus.windows.net:9093/catalog',
@destination_credential = EventHubCredential,
@max_message_size_kb = 256,
@partition_key_scheme = N'None';
EXEC sys.sp_add_object_to_event_stream_group N'CatalogChanges', N'Catalog.Product';Configuring change event streaming
Limits and operations
CES requires the full recovery model, streams only DML (not DDL), does not send rows that existed before it was enabled, and cannot stream tables with clustered columnstore indexes, memory-optimized tables, graph, external, temporal history or ledger history tables, or Always Encrypted. Columns of types such as json, vector and xml are skipped, Dynamic Data Masking and RLS do not apply to streamed data, and a table belongs to one stream group. It cannot be combined with CDC or transactional replication. Because delivery is guaranteed, the transaction log cannot truncate while events are undelivered, so sys.dm_change_feed_errors and log size must be monitored. The AMQP protocol for CES was deprecated in August 2026 in favour of the Kafka protocol on port 9093. The destination type depends on the platform: Azure SQL Database and SQL database in Fabric accept only AzureEventHubs, as in the example above, while SQL Server 2025 and Azure SQL Managed Instance use AzureEventHubsApacheKafka with the same namespace.servicebus.windows.net:9093/eventhub location format.
Can CES stream it?
Fan-out of order changes
Five microservices must react within seconds to new and changed orders in an Azure SQL database. Today each service polls the Orders table every few seconds, which adds load and duplicates logic. The team accepts a preview feature. What should the developer implement?
Configure change event streaming for the Orders table to an Azure Event Hubs event hub with the database's managed identity, and have each microservice consume the stream with its own consumer group. The database publishes each change once and the services read independently without polling. Change Tracking or CDC would still require every service to poll the database, and a trigger calling five services would slow every order transaction.
Why must the transaction log be monitored when CES is enabled?
Show answer
Delivery is guaranteed, so the log cannot truncate while events are undelivered and can grow until writes fail.
Exam Tips
Remember for the exam
- Near real-time push of changes to many consumers: CES to Event Hubs or Fabric Eventstream.
- CES is in preview; events are CloudEvents with old and new values.
- Setup: sp_enable_event_stream, sp_create_event_stream_group, sp_add_object_to_event_stream_group.
- Undelivered events prevent log truncation; monitor errors and log size.