Forum Discussion
tables with a nonclustered primary key are not supported on Microsoft Fabric platform
Hilkara777- Hope this helps to solve the issue.
Root Cause:Fabric requires clustered primary keys for mirroring. If your Azure SQL DB has tables with nonclustered primary keys, mirroring may fail or lag.
Why it happened: After replication, some tables may have retained nonclustered keys from the old DB. Fabric doesn't support mirroring such tables.
Issue Fix: Check the index type of tables in Source Azure SQL DB, Drop the nonclustered primary key constraint and Create a clustered primary key, this will make the table compatible with Fabric mirroring.
You can use this query to list the constraints and indexes :
SELECT |
Query to Drop and Create index:
| ALTER TABLE YourTableName DROP CONSTRAINT PK_YourTableName; |
| ALTER TABLE YourTableName ADD CONSTRAINT PK_YourTableName PRIMARY KEY CLUSTERED (YourPrimaryKeyColumn); |