Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.
Hello everyone,
When I create a corresponding mirrored database for Azure SQL Database using the API (as referenced in the article "Items - Create Mirrored Database"), the mirrored database status is shown as running, and I can correctly see the tables to be mirrored. However, the status remains "running," and no data synchronization occurs successfully.As below shows.
And when I switch to configuring the mirrored database for the same database using the UI, I can quickly observe that the data has been synchronized.
The above two scenarios were tested separately without simultaneously performing mirror operations on a database.
What is the reason behind this? How can Isolve it?
Solved! Go to Solution.
Hi @Jason_Xu
Thank you for reaching out to the Microsoft Fabric Forum Community.
Troubleshoot Fabric Mirrored Databases From Azure SQL Database - Microsoft Fabric | Microsoft Learn
The System Assigned Managed Identity (SAMI) of your Azure SQL logical server needs to be enabled, set as the primary identity, and have Read and Write permissions on the mirrored database in Fabric. When you create a mirror through the Fabric UI, these permissions are usually granted automatically. However, when creating it via the API, you might need to assign them manually or they may not be set up correctly. If the SAMI was ever disabled and then re-enabled, it becomes a new identity, so any previous permission grants will no longer be valid.
For Azure SQL Database sources, mirroring relies on the change feed to read and synchronize changes. If the change feed isnโt enabled, or if there havenโt been any recent changes, the replication may show as Running but with no actual data movement. You can check whether the change feed is active and if there are any errors by querying these DMVs on the source database : SELECT * FROM sys.dm_change_feed_log_scan_sessions; SELECT * FROM sys.dm_change_feed_errors;
Even if the data has landed in OneLake, the metadata might take some time to appear in the SQL analytics endpoint. You may need to manually trigger a metadata refresh (for example, by selecting Refresh in the Fabric portal). If the Monitor Replication pane doesnโt show a Last completed timestamp for a table, it means replication hasnโt started yet.
If your JSON body especially the definition payload contains errors (like missing mounted tables or incorrect schema names), the mirror may not start properly. Always make sure to include the default schema if you want to preserve your schema structure.
If your Fabric workspace capacity is paused, overloaded, or scaled down, replication can pause or fail to resume. Make sure your capacity is active and healthy before testing mirroring again.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks.
Hi @Jason_Xu
Thank you for reaching out to the Microsoft Fabric Forum Community.
Troubleshoot Fabric Mirrored Databases From Azure SQL Database - Microsoft Fabric | Microsoft Learn
The System Assigned Managed Identity (SAMI) of your Azure SQL logical server needs to be enabled, set as the primary identity, and have Read and Write permissions on the mirrored database in Fabric. When you create a mirror through the Fabric UI, these permissions are usually granted automatically. However, when creating it via the API, you might need to assign them manually or they may not be set up correctly. If the SAMI was ever disabled and then re-enabled, it becomes a new identity, so any previous permission grants will no longer be valid.
For Azure SQL Database sources, mirroring relies on the change feed to read and synchronize changes. If the change feed isnโt enabled, or if there havenโt been any recent changes, the replication may show as Running but with no actual data movement. You can check whether the change feed is active and if there are any errors by querying these DMVs on the source database : SELECT * FROM sys.dm_change_feed_log_scan_sessions; SELECT * FROM sys.dm_change_feed_errors;
Even if the data has landed in OneLake, the metadata might take some time to appear in the SQL analytics endpoint. You may need to manually trigger a metadata refresh (for example, by selecting Refresh in the Fabric portal). If the Monitor Replication pane doesnโt show a Last completed timestamp for a table, it means replication hasnโt started yet.
If your JSON body especially the definition payload contains errors (like missing mounted tables or incorrect schema names), the mirror may not start properly. Always make sure to include the default schema if you want to preserve your schema structure.
If your Fabric workspace capacity is paused, overloaded, or scaled down, replication can pause or fail to resume. Make sure your capacity is active and healthy before testing mirroring again.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks.
Hi @Jason_Xu
Thank you for reaching out to the Microsoft Fabric Forum Community.
@rubayatyasmin Thanks for the inputs.
I hope the information provided was helpful. If you still have questions, please don't hesitate to reach out to the community.
Hi @Jason_Xu
Hope everythingโs going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.
Hi,
Could you please post the entire json payload? Ensure you have the correct fabric permission.
if nothing works create support ticket.
Proud to be a Super User!
Hi,
This is the code I used to create a mirror database using the API. I verified the status of the database and table, and it is valid