Just say YES to CES in SQL Server 2025

The demo of Bob Ward about new features was nice, but lacked a bit of a CES demo. A few customers always ask what is the best way to sync changed data between locations, Triggers perhaps?! (Just yoking).

So I gave it a try with my friend Claude .. here it is.

ronaldgithub/CES

You have to do some setup work (Event Hub and Consumer Groups), just take a moment to read the README.md and the CLAUDE.md.

And prepare some Consumer Groups.

After the Azure Event Hub and the Consumer Groups are alive, do some changes in SSMS and ..voila.

Now it gets interesting “CES is a continuous event pipeline that streams committed changes from the transaction log into event streams that can be consumed by.. ” lets POC some scenario’s.

TabWhat it shows
Idempotency & OffsetsA duplicate replayed event is detected via the ledger and skipped — no double-apply
Two ConsumersTwo independent consumers (Replication, Analytics) track separate ledgers/offsets without interfering
Parallel Partitions4 partition workers each process their own event stream independently
Multi-Table RoutingOne shared ledger/offset routes events to the correct target table (Orders vs OrderLines)
BatchingEvents buffer into a batch; the offset updates once per commit, and a simulated mid-batch crash proves replay-safety

Lets simulate some batching..

And Simulate a Crash and reload the batch.

Check if changes were inserted.

Check Idempotency & Offsets..

And check the ledger and offsets table, they do the administration.

And Multi-Table Routing (dbo.Orders and dbo.OrderLines, no FK’s we do not know who comes first..)

And Parallel Partitions..

And a Two Consumers constellation, the changes reach the destination in two different databases.

CES was probably one of the nicest features SQL Server 2025 has, just forget the AI marketing. Now the question: “Can the Event Hub data directly being read into SQL Server?”

No — CES is one-directional. It’s a producer only: SQL Server pushes DML changes out to Azure Event Hubs (or a Kafka-compatible endpoint). There is no counterpart feature that lets SQL Server subscribe to an Event Hub and pull events in, and nothing in the engine that maintains a consumer offset/ledger for you. Microsoft’s own docs and walkthroughs all assume a client application on the consuming side.

If you want events to land back in a SQL database without writing an application yourself, the realistic options are managed services that do the consuming for you:

  • Azure Stream Analytics — Event Hubs input, Azure SQL Database output, no code.
  • Microsoft Fabric Eventstream — has a documented path for ingesting CES events and routing them onward.
  • Kafka Connect with a JDBC sink connector — since CES speaks the Kafka protocol.

But note these target Azure SQL / cloud destinations; for an on-prem SQL Server 2025 destination, a small consumer app like yours remains the stand.

Geef een reactie

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *