Forum Discussion
Schema Mismatch on Mirror database from SQL Server
- 10 months ago
The Alter command cannot be used on a mirrored database due to its read-only state.
Thank you to lbendlin and v-venuppu for trying to help. The issue has been resolved by:
Disabling and re-enabling CDC on the source database.
Re-enabling CDC on all tables one by one.
Creating a new connection with the latest gateway.
Establishing a new database mirror.
The solution has been stable and monitored successfully for the last four days
Hi TWorku ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you lbendlin for the prompt response.
The schema mismatch occurs because the nullable flag differs between SQL Server (NOT NULL) and Fabric (Nullable = True). Even though the data type (date) matches, Fabric treats this as a schema conflict. The mirroring process often marks all columns as nullable by default.Since you don’t want to modify the source, fix it on the Fabric side by altering the target column to allow NULLs:
ALTER TABLE dbo.xxxxxxx ALTER COLUMN [Date] date NULL;
Then restart the mirroring/CDC job - the incoming and target schemas will align, and the SchemaMergeFailure error will be resolved.
- TWorku10 months agoFrequent Visitor
The Alter command cannot be used on a mirrored database due to its read-only state.
Thank you to lbendlin and v-venuppu for trying to help. The issue has been resolved by:
Disabling and re-enabling CDC on the source database.
Re-enabling CDC on all tables one by one.
Creating a new connection with the latest gateway.
Establishing a new database mirror.
The solution has been stable and monitored successfully for the last four days