Courseiva
Configure and manage automation of tasksmediumMultiple ChoiceObjective-mapped

DP-300 Configure and manage automation of tasks Practice Question

You are implementing automated table partitioning maintenance for a large Azure SQL Database. The partitioning function uses a monthly range. You need to add a new partition for the next month and remove the oldest partition. What is the best way to automate this?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Schedule a T-SQL script via Elastic Database Jobs that uses ALTER PARTITION FUNCTION to SPLIT the range and MERGE the oldest boundary.

To automate monthly partition maintenance, you need to add a new partition for the next month (split the range) and remove the oldest partition (merge the oldest boundary). The T-SQL commands ALTER PARTITION FUNCTION ... SPLIT RANGE and ALTER PARTITION FUNCTION ... MERGE RANGE accomplish this. Scheduling these via Elastic Database Jobs provides automation. Option A's SELECT INTO and TRUNCATE are not partition management operations. Option B's ALTER INDEX REORGANIZE is for index maintenance, not partition boundary changes. Option D's SWITCH PARTITION moves data without altering the partition function/scheme.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a stored procedure that uses SELECT INTO to copy old data to a history table and then TRUNCATE the partition.

    Why it's wrong here

    This manual process is not efficient and does not use partition management features.

  • Use ALTER INDEX REORGANIZE to compress old partitions.

    Why it's wrong here

    ALTER INDEX REORGANIZE reorganizes index fragments, not partitions.

  • Schedule a T-SQL script via Elastic Database Jobs that uses ALTER PARTITION FUNCTION to SPLIT the range and MERGE the oldest boundary.

    Why this is correct

    ALTER PARTITION FUNCTION with SPLIT and MERGE is the standard way to add and remove partitions.

  • Use the SWITCH PARTITION operation to move the oldest partition to a staging table and then drop the staging table.

    Why it's wrong here

    SWITCH PARTITION is used to move data out, but the partition still exists; you still need to merge the boundary.

About these practice questions

This DP-300 question is part of Courseiva's 906-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DP-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DP-300 exam.