📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How would you move a large tenant from a shared database to its own Azure SQL database with minimal downtime?

Staff / Architect Architecture Expert

🎯 Key points

  • Provision target with the same migration version
  • Bulk copy in foreign-key order, preserving keys
  • Verify counts and checksums
  • Capture changes during copy (watermark, change tracking or CDC)
  • Short per-tenant write freeze for the final delta
  • Flip the catalogue and invalidate caches
  • Keep source read-only for rollback, then delete

⏱ 30-second answer

Provision the new database from the current migration bundle, then copy the tenant's rows table by table in foreign-key order (SqlBulkCopy or BCP, keeping key values), and verify with counts and checksums. Track changes made during the copy (a ModifiedAt watermark, change tracking or CDC), then take a short write freeze for that tenant, apply the final delta, flip the catalogue entry to the new connection and clear the catalogue cache. Keep the source rows read-only for a rollback window, then delete them. Rehearse on a copy and measure the freeze time first.

🔍 What the interviewer is checking

Checks that the hybrid model is operationally realistic

↩ Usually asked after

More in Production EF

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me