Forum Discussion
Error with SQL DB Mirroring to Fabric
- 1 year ago
Hi jkerber,
Ensure that only user-defined tables are selected for mirroring, and explicitly exclude system-generated tables, especially those under the cdc schema or with names like MSchange_tracking. These are internal metadata tables used by SQL Server for Change Tracking or CDC and are not meant to be mirrored.Double-check that the database context and schema are correctly set in your mirroring configuration, as misalignment here can cause errors. If retrying replication on individual failed tables shows them as valid, it confirms the issue is schema-level, not data-level.
Avoid including any internal SQL Server metadata tables in the replication set. Review your gateway setup and mirroring configuration to include only the necessary user tables.
If the issue persists, try manually replicating a few failing tables and consider temporarily disabling CDC, mirroring the tables, and then re-enabling CDC after successful replication.
I'm attaching the official Microsoft documents for your review, This might help you:
Microsoft Fabric Mirrored Databases From SQL Server - Microsoft Fabric | Microsoft Learn
Troubleshoot Fabric Mirrored Databases - Microsoft Fabric | Microsoft Learn
Limitations of Fabric Mirrored Databases From SQL Server - Microsoft Fabric | Microsoft Learn
The Microsoft community is here to assist you. Thank you, and please continue using the Forum.Regards,
Community Support Team.
Please find below details hope this helps to resolve your issue.
Exclude System Tables: Exclude tables like dbo.MSchange_tracking_history from replication. They are system/CDC-related and not meant for mirroring.
Review CDC Configuration: Ensure CDC is enabled only on proper user tables. Verify that only the intended tables are selected.
Filter Replication Targets: Adjust your settings to exclude non-existent or system tables. Check that your replication job targets the correct schema.
Validate Database Context: Confirm replication is running under the correct database context with accurate schema names.
Monitor and Troubleshoot: Use SQL diagnostic tools to track replication issues and consult Fabric documentation if problems persist.
For more details, refer to https://learn.microsoft.com/en-us/fabric/database/mirrored-database/sql-server-troubleshoot.