nerdexam
Microsoft

DP-300 · Question #233

Drag and Drop Question You have an Azure subscription that contains an Azure SQL database named SQLDb1. SQLDb1 contains a table named Table1. You plan to deploy an Azure web app named webapp1 that wil

The correct answer is Connect to SQLDb1 and run the following Transact-SQL statement ALTER DATABASE SQLDb1 SET CHANGE_TRACKING = ON; From webapp1, connect to SQLDb1, obtain the initial dataset and run the CHANGE_TRACKING_CURRENT_VERSION() function; Connect to SQLDb1, obtain the initial dataset, and run the CHANGETABLE() function. Azure SQL Change Tracking - Exam Explanation This question tests your knowledge of SQL Change Tracking (not Change Data Capture). The key constraint is minimize compute and storage, which rules out CDC (Change Data Capture) - CDC stores full row data in system tables, consuming m

Submitted by devops_kid· Mar 6, 2026Plan and implement data platform resources

Question

Drag and Drop Question You have an Azure subscription that contains an Azure SQL database named SQLDb1. SQLDb1 contains a table named Table1. You plan to deploy an Azure web app named webapp1 that will export the rows in Table1 that have changed. You need to ensure that webapp1 can identify the changes to Table1. The solution must meet the following requirements: - Minimize compute times. - Minimize storage. Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order. Answer:

Exhibits

DP-300 question #233 exhibit 1
DP-300 question #233 exhibit 2

Answer Area

Drag items

From webapp1, connect to SQLDb1, obtain the initial dataset and run the CHANGE_TRACKING_CURRENT_VERSION() function.Connect to SQLDb1 and run the following Transact-SQL statement EXEC sys.sp_cdc_enable_db.Connect to SQLDb1, obtain the initial dataset, and run the CHANGETABLE() function.Connect to SQLDb1 and run the following Transact-SQL statement ALTER DATABASE SQLDb1 SET CHANGE_TRACKING = ON.Connect to SQLDb1 and run the following Transact-SQL statement EXEC sys.sp_cdc_enable_table.

Correct arrangement

  • Connect to SQLDb1 and run the following Transact-SQL statement ALTER DATABASE SQLDb1 SET CHANGE_TRACKING = ON
  • From webapp1, connect to SQLDb1, obtain the initial dataset and run the CHANGE_TRACKING_CURRENT_VERSION() function
  • Connect to SQLDb1, obtain the initial dataset, and run the CHANGETABLE() function

Explanation

Azure SQL Change Tracking - Exam Explanation

This question tests your knowledge of SQL Change Tracking (not Change Data Capture). The key constraint is minimize compute and storage, which rules out CDC (Change Data Capture) - CDC stores full row data in system tables, consuming more storage. Change Tracking only stores the fact that a row changed (and its key), making it leaner.


Why CDC items are wrong

  • EXEC sys.sp_cdc_enable_db and EXEC sys.sp_cdc_enable_table are CDC commands - they enable Change Data Capture, which stores full before/after row images. This violates "minimize storage."

Correct Sequence Explained

Step 1: ALTER DATABASE SQLDb1 SET CHANGE_TRACKING = ON

You must enable Change Tracking at the database level first. This is a prerequisite - nothing else works without it. You'd also normally follow this with ALTER TABLE Table1 ENABLE CHANGE_TRACKING, but that's not listed as a choice, so Step 1 is the database-level enable.

Step 2: From webapp1, obtain the initial dataset and run CHANGE_TRACKING_CURRENT_VERSION()

Before you can track what changed, you need a baseline snapshot and a version anchor. CHANGE_TRACKING_CURRENT_VERSION() returns the current tracking version number. webapp1 captures all current rows plus this version number and stores it. This is the "sync point" - future queries will ask "what changed since this version?"

Step 3: Run CHANGETABLE()

On subsequent runs, webapp1 calls CHANGETABLE(CHANGES Table1, @last_sync_version) to retrieve only the rows that changed since the last captured version. This is the ongoing change detection step - it's meaningless without Step 2 having established the baseline version.


Common Mistakes

MistakeWhy it's wrong
Choosing CDC (sp_cdc_enable_db)CDC stores full row history - violates "minimize storage"
Running CHANGETABLE() before getting baseline versionYou'd have no version anchor; the function needs a @last_sync_version parameter
Skipping ALTER DATABASE ... SET CHANGE_TRACKING = ONChange Tracking is disabled by default; all subsequent steps will fail
Confusing Change Tracking with CDCCT = lightweight (keys + version); CDC = heavyweight (full row audit log)

The core mental model: enable -> baseline -> delta queries.

Topics

#Change Tracking#Azure SQL Database#Data synchronization#T-SQL

Community Discussion

No community discussion yet for this question.

Full DP-300 Practice