Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
krisjones
New Contributor III

SQL Server Mirroring - how to identify latest replicated records

I am using SQL Server Mirroring to mirror my SQL Server database called XX into a Fabric workspace.

I created a Lakehouse and a shortcut in the Lakehouse to the XX database so I can access it in Notebooks.

I'm building a data warehouse from the XX database using ETL code in Spark Notebooks.

Requirement:

I need to now what are the latest records that were replicated so I can do incremental loads into my data warehouse.

I've been using Change data feed | Delta Lake with my other ETL code that does not use mirrored databases.

Since a mirrored database is stored in OneLake in delta format, I tried to use CDF by first turning it on for one mirrored table in my Lakehouse. 

ALTER TABLE Slide SET TBLPROPERTIES (delta.enableChangeDataFeed = true)

Problem:

I get the following error:

Operation failed: "Forbidden", 403, PUT

This request is not authorized to perform this operation using this permission.

I guess since the delta tables are managed by OneLake, I cannot change anything. 

 

Other facts:

- I am the Fabric Administrator and an Admin on all workspaces

- The XX database does not have any timestamp columns that I can use.

 

Question:

Is there a way to turn on delta lake CDF on the OneLake mirrored database tables? 

If not, how can I know which records have been updated/replicated since the last time I ran my ETL code when using SQL Server Mirroring? 

 

3 REPLIES 3
rohit1991
Honored Contributor

Hi @krisjones 

 

Youโ€™re right , you canโ€™t enable Change Data Feed (CDF) on mirrored databases in Fabric. Those tables are fully managed by OneLake, which means theyโ€™re read-only and donโ€™t allow property changes like enableChangeDataFeed.

Could you please try below steps:

  • CDF Limitation: CDF works only for Delta tables that you create or control, not for mirrored ones.

  • Track updates from SQL Server: If your source database has a column like LastModifiedDate or UpdatedOn, use that to identify new or changed records in your ETL process.

  • No timestamp column? Add one or maintain a small log table in SQL Server to capture last-updated times - itโ€™s the cleanest way to detect recent loads.

  • Better alternative: If possible, enable Change Tracking (CT) or Change Data Capture (CDC) on the SQL Server side. These features are built exactly for incremental data pulls.

  • About the 403 error: Thatโ€™s expected -Fabric blocks direct property edits on mirrored tables because theyโ€™re controlled by the service.

In short:
You canโ€™t enable CDF for mirrored databases. The best way to track recent replicated data is by handling it on the SQL Server side - either through timestamps or change tracking.


Did it work? โœ” Give a Kudo โ€ข Mark as Solution โ€“ help others too!
krisjones
New Contributor III

@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.

rohit1991
Honored Contributor

Hi @krisjones 

 

Youโ€™re right - SQL Server Mirroring is simpler, but unfortunately, it doesnโ€™t provide the same level of change tracking or incremental awareness that Delta Lake CDF offers in Fabric.

Mirroring is designed mainly for high availability and disaster recovery, not for tracking which rows were updated or inserted. It keeps both databases synchronized, but it doesnโ€™t expose metadata about what changed - thatโ€™s why Fabric canโ€™t surface CDF-like functionality on mirrored tables.

If your main goal is to capture incremental changes, then SQL Change Tracking (CT) or Change Data Capture (CDC) are still the only reliable options. They can be used alongside your mirrored setup -for example, enable CT or CDC on the source SQL database (before mirroring) and use that data in your ETL process.

In short: SQL Server Mirroring keeps databases in sync but doesnโ€™t record row-level changes, so it canโ€™t act like Delta CDF. Use Change Tracking or CDC on the source instead if you need incremental updates.


Did it work? โœ” Give a Kudo โ€ข Mark as Solution โ€“ help others too!

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (15,084)