Edit

Share via


Troubleshoot Fabric mirrored databases from SQL Server

This article covers troubleshooting steps troubleshooting for mirroring a database in SQL server.

Important

This feature is in preview.

Changes to Fabric capacity or workspace

Learn more from Changes to Fabric capacity.

In addition, note the following for SQL Server specifically:

Cause Result Recommended resolution
Workspace deleted Mirroring stops automatically and disables the change feed in SQL Server In case mirroring is still active on the SQL Server, execute the following stored procedure on your SQL Server: exec sp_change_feed_disable_db;.
Any other resource errors Mirroring is disabled To ensure your compute resources are not impacted and to minimize impact on the SQL Server, mirroring will be disabled on any persistent resource errors.
"Users can access data stored in OneLake with apps external to Fabric" setting disabled "Replicator - Tables Cannot Reach Replicating Status" Enable the Tenant setting Users can access data stored in OneLake with apps external to Fabric.

Queries for troubleshooting in SQL Server 2025

If you're experiencing mirroring problems in SQL Server 2025, perform the following database level checks using Dynamic Management Views (DMVs) and stored procedures to validate configuration.

  1. Execute the following query to check if the changes properly flow:

    SELECT * FROM sys.dm_change_feed_log_scan_sessions;
    
  2. If the sys.dm_change_feed_log_scan_sessions DMV doesn't show any progress on processing incremental changes, execute the following T-SQL query to check if there are any problems reported:

    SELECT * FROM sys.dm_change_feed_errors;
    
  3. If there aren't any issues reported, execute the following stored procedure to review the current configuration of the mirrored SQL Server. Confirm it was properly enabled.

    EXEC sp_help_change_feed;
    

    The key columns to look for here are the table_name and state. Any value besides 4 indicates a potential problem.

  4. Review Troubleshoot Fabric mirrored databases.

  5. Contact support if troubleshooting is required.

Extended events session

The following extended events session can be used to troubleshoot Fabric Mirroring on your SQL Server 2025 instance. It is recommended only to create this session for troubleshooting or support purposes.

CREATE EVENT SESSION [sqlmirroringxesession] ON SERVER  
ADD EVENT sqlserver.synapse_link_addfilesnapshotendentry,  
ADD EVENT sqlserver.synapse_link_db_enable,  
ADD EVENT sqlserver.synapse_link_end_data_snapshot,  
ADD EVENT sqlserver.synapse_link_error,  
ADD EVENT sqlserver.synapse_link_info,  
ADD EVENT sqlserver.synapse_link_library,  
ADD EVENT sqlserver.synapse_link_perf,  
ADD EVENT sqlserver.synapse_link_scheduler,  
ADD EVENT sqlserver.synapse_link_start_data_snapshot,  
ADD EVENT sqlserver.synapse_link_totalsnapshotcount,  
ADD EVENT sqlserver.synapse_link_trace  
WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=ON)  
GO  
 
ALTER EVENT SESSION [sqlmirroringxesession] ON SERVER
STATE = start;
GO

Queries for troubleshooting in SQL Server 2016-2022

Change Data Capture (CDC) is used for Fabric Mirroring in versions SQL Server 2025.

  1. Review Known issues and errors in CDC for common error resolutions.
  2. Review Administer and monitor CDC for diagnostic queries.
  3. Review Troubleshoot Fabric mirrored databases.
  4. Contact support if troubleshooting is required.