Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

3.2.4. Mirroring: Database vs. Metadata

💡 First Principle: Mirroring replicates external data into Fabric, but what gets replicated depends on the source. Database mirroring copies actual data rows; metadata mirroring copies only the catalog information (table names, schemas). Understanding this distinction is critical for choosing the right approach.

Scenario: Your organization uses Azure SQL Database for operational systems and Databricks for data science. You want both available in Fabric without duplicating data unnecessarily.

Mirroring Types

TypeWhat's ReplicatedUse Case
Database MirroringActual data (CDC-based)Azure SQL, Cosmos DB, Snowflake
Metadata MirroringCatalog information onlyAzure Databricks Unity Catalog

Mirroring Selection

  • Azure Cosmos DB: Database mirroring (replicates documents)
  • Azure SQL Database: Database mirroring (replicates tables)
  • Azure Databricks: Metadata mirroring (replicates catalog, not data)

Database Mirroring: How It Works

Database mirroring uses Change Data Capture (CDC) to continuously replicate changes:

Source Database → CDC captures INSERT/UPDATE/DELETE → Fabric syncs changes → OneLake Delta tables
AspectBehavior
Initial syncFull snapshot of selected tables
Ongoing syncNear real-time CDC replication
Data formatConverted to Delta tables in OneLake
LatencyTypically seconds to minutes
Schema changesPropagated automatically
WritabilityMirrored tables are read-only; to reshape, partition or OPTIMIZE them, materialize into a lakehouse or warehouse table (CTAS, notebook)
  • Change capture for Azure SQL Database: the source engine scans its own transaction log and publishes changes to a OneLake landing zone. This is a change feed, so you don't enable Change Tracking or CDC yourself; check progress with sys.dm_change_feed_log_scan_sessions. The server's managed identity must keep Read/Write on the mirrored item, or no new data is mirrored.
  • Setup: enable the Azure SQL server's managed identity and grant permissions → create a Mirrored Azure SQL Database item with the connection (Entra ID or SQL auth) → mirror all tables or selected ones → monitor replication. Query through the autogenerated SQL analytics endpoint, Spark or Direct Lake.
  • Read-only replica: the replicator owns all writes. You can create views, but you can't INSERT/UPDATE, OPTIMIZE or VACUUM mirrored tables.
  • Mirroring vs. a scheduled Copy pipeline: mirroring replicates continuously with no schedule or pipeline to maintain; a Copy pipeline moves a batch on each run and can filter or reshape data on the way.

Metadata Mirroring: How It Works

Metadata mirroring syncs the catalog without copying data:

Databricks Unity Catalog → Fabric syncs table/view definitions → Fabric reads the Delta files in place via shortcuts
AspectBehavior
What syncsTable names, schemas, locations
What doesn't syncActual data rows
Query executionFabric engines (SQL analytics endpoint, Spark, Direct Lake) read the data through OneLake shortcuts
BenefitUnified catalog without data duplication

When to Use Which

ScenarioMirroring TypeWhy
Need data in Fabric for fast queriesDatabase mirroringData is local
Want unified catalog, data stays in placeMetadata mirroringAvoids duplication
Source is Azure SQL/CosmosDatabase mirroringOnly option available
Source is DatabricksMetadata mirroringOnly option available

⚠️ Exam Trap: Databricks uses metadata mirroring, not database mirroring. The data stays in Databricks storage; only the Unity Catalog metadata is synchronized to Fabric. Questions that mention "mirroring Databricks data" are testing whether you understand this distinction.

⚠️ Common Pitfall: Expecting instant freshness with metadata mirroring. Only the catalog is synced; the data is read in place through shortcuts, and changes made in Databricks can take seconds to minutes to appear in Fabric.

Reflection Question: Your company wants to use data from both Azure Cosmos DB (operational data) and Azure Databricks (ML features). What mirroring type would you use for each?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder•20 professional certifications