Forum Discussion
Fabric Mirrored Databases
I have just va couple of questions about fabroc mirrored databases
When i stop the replication all monitoring data disappears, when i start it again monitoring data appears but the last complete data gets updated , is the mirrored database being synchronised again ?
Also i need to nown when all replication has finished before the next process starts, there is a time-lag between putting the files in the landing zone and then the data is available in the MD, what is the best way of determining that all synchronisation has finished ?
But, did you check the status using the API? according to the current documntation, at table-level, there is not sucha "Running", see from current oficial doc. Mirroring - Get Tables Mirroring Status - REST API (MirroredDatabase) | Microsoft Learn ... in my article Removing Orphan Fabric Deployment Pipelines follow pre-requisites and solution steps 1 (get access token) & 2 (post-man auth) and issue a Post request to the interface replacing Ids as corresponding
https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/mirroredDatabases/{mirroredDatabaseId}/getTablesMirroringStatusAnd check the status of the tables, what is the actual status of the tables?
Let us know!
6 Replies
- KarinSzilagyiSuper User
Hi tim_goodsell, sorry for the bad formatting, but I'm on mobile atm.
What exactly are you mirroring? The different sources have different quirks to be aware of if you stop your mirrored DB or change the tables in your source in any way.
How long did you stop the Mirror before resuming? I can't find the exact relevant section in the Docs right now, but it should be a similar behavior as when you pause your capacity:
https://learn.microsoft.com/en-us/fabric/mirroring/troubleshooting
Regarding the "how to know when it's done" part, my answer would depend on why and how often your pausing/resuming.
If you're pausing your capacity over night, then resume in the morning, you could write the highest ID/timestamp from each of your mirrored tables into a lakehouse via a scheduled notebook, set up shortcuts from your mirror to the same lakehouse and create a power Bi report to show the synch status for each table + use it as your source for data activator to notify you when they are in synch.
- svenchioSuper User
Hi tim_goodsell , the answer to "is the mirrored database being synchronised again?" is Yes, when you stop replication, the monitoring metrics/history are cleared, when replication restarts, Fabric resumes synchronisation and monitoring from the current state, so the “last completed” timestamp gets updated as replication catches up.
To determine when replication has fully completed, the best approach is to monitor the replication lag/status via API's rather than relying on data arrival in the landing zone, I'm thinking that there's an orchestration that could query the API, if so, use Mirroring - Get Mirroring Status - REST API (MirroredDatabase) | Microsoft Learn to get the status of the mirrored database and make sure replication is Running; use Mirroring - Get Tables Mirroring Status - REST API (MirroredDatabase) | Microsoft Learn for a specific table(s); Use Replicating it is the status you want to wait for before downstream processing starts, because it means the initial snapshot has completed and CDC replication is active.
Hope it helps, if you find useful a thumb-up would be nice and if this information solved your issue, mark as solution. Best of lucks!
- tim_goodsellFrequent Visitor
Thanks for that, looking at the monitor replication screen the status is 'running' and for each table the status is 'running', does this mean the tables are still being currently updated or is it in a ready stage waiting for new files to landed in the landing zone before the mirrored database is updated.
- svenchioSuper User
But, did you check the status using the API? according to the current documntation, at table-level, there is not sucha "Running", see from current oficial doc. Mirroring - Get Tables Mirroring Status - REST API (MirroredDatabase) | Microsoft Learn ... in my article Removing Orphan Fabric Deployment Pipelines follow pre-requisites and solution steps 1 (get access token) & 2 (post-man auth) and issue a Post request to the interface replacing Ids as corresponding
https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/mirroredDatabases/{mirroredDatabaseId}/getTablesMirroringStatusAnd check the status of the tables, what is the actual status of the tables?
Let us know!
- v-ssriganeshCommunity Support
Hi tim_goodsell,
Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to svenchio & KarinSzilagyi for sharing valuable insights.
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.
- v-ssriganeshCommunity Support
Hello tim_goodsell,
We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.
Thank you.