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

📚 Interview question

What is the difference between change tracking and change data capture in SQL Server, and when would you use each?

Mid-Level Theory Intermediate

🎯 Key points

  • Change tracking: keys changed since a version, no old values
  • CDC: log-based, async, before and after values
  • Change tracking is synchronous and lightweight
  • CDC needs cleanup jobs and more storage
  • Use CHANGETABLE(CHANGES ...) vs cdc.fn_cdc_get_all_changes_*
  • Azure SQL CDC needs S3 or above, or vCore

⏱ 30-second answer

Change tracking records which primary keys changed since a version number, synchronously and cheaply, but keeps no old values or history of intermediate changes; you re-read the current row. CDC reads the transaction log asynchronously and writes change tables with before and after values for every change, so it suits feeding a warehouse or an event stream. Change tracking fits "sync what changed" (mobile sync, cache refresh); CDC fits auditing column values or streaming to Kafka or Fabric. CDC costs more storage and on Azure SQL needs S3+ or vCore.

🔍 What the interviewer is checking

Checks whether they know the cost and data each feature provides for downstream sync.

↩ Usually asked after

More in SQL Features

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me