Forum Discussion
SQL Server Mirroring - how to identify latest replicated records
- 10 months ago
Hi krisjones
SQL Server Mirroring helps keep databases synchronized for high availability, but it doesn’t provide the same row-level change tracking that Delta Lake’s Change Data Feed (CDF) offers in Fabric. Mirroring is designed mainly for disaster recovery and ensures both databases stay identical, but it doesn’t store information about what data was changed, updated, or inserted. That’s why Fabric can’t enable CDF on mirrored tables , it has no change metadata to work with. If your goal is to track incremental updates, you can use SQL Change Tracking (CT) or Change Data Capture (CDC) instead, as both are made for identifying new or modified records. You can enable CT or CDC on your source SQL database before mirroring and then use that data in your ETL or Fabric pipelines. This setup allows you to capture only the changes without stressing the mirrored database. In short, mirroring keeps data in sync but not aware of changes, so CT or CDC is the best way to achieve incremental refresh similar to CDF.
Hi krisjones
Change Data Feed (CDF) can’t be enabled on mirrored databases in Fabric because those tables are managed by OneLake , they’re read-only and don’t allow property changes like enableChangeDataFeed.
Could you please try below steps:
-
CDF Limitation: Works only for Delta tables you create or control, not mirrored ones.
-
Track updates from SQL Server: If your table has a LastModifiedDate or UpdatedOn column, use that to detect new or changed records in ETL.
-
No timestamp column:Add one or maintain a small log table in SQL Server to capture last-updated times.
-
Alternative approach: Use Change Tracking (CT) or Change Data Capture (CDC) on SQL Server , they’re built for incremental updates.
-
About the 403 error: That’s expected; Fabric blocks direct edits on mirrored tables since they’re managed by the service.
rohit1991
I'm already using SQL Server change tracking but I would like to use SQL Server Mirroring because it's much simpler. But if there is no way to have similar functionationality as Delta Lake CDF in Fabric on the mirrored database then I can't use mirroring.
- rohit199110 months ago
Super User
Hi krisjones
SQL Server Mirroring helps keep databases synchronized for high availability, but it doesn’t provide the same row-level change tracking that Delta Lake’s Change Data Feed (CDF) offers in Fabric. Mirroring is designed mainly for disaster recovery and ensures both databases stay identical, but it doesn’t store information about what data was changed, updated, or inserted. That’s why Fabric can’t enable CDF on mirrored tables , it has no change metadata to work with. If your goal is to track incremental updates, you can use SQL Change Tracking (CT) or Change Data Capture (CDC) instead, as both are made for identifying new or modified records. You can enable CT or CDC on your source SQL database before mirroring and then use that data in your ETL or Fabric pipelines. This setup allows you to capture only the changes without stressing the mirrored database. In short, mirroring keeps data in sync but not aware of changes, so CT or CDC is the best way to achieve incremental refresh similar to CDF.