DP-300 Configure and manage automation of tasks Practice Question
Exhibit
Refer to the exhibit.
```
{
"properties": {
"targetGroups": [
{
"type": "SqlDatabase",
"serverName": "myserver",
"databaseName": "mydb"
}
],
"content": {
"command": "ALTER INDEX ALL ON Sales.Orders REBUILD"
}
}
}
```You are reviewing an Azure CLI command that creates an elastic job step. The job step is intended to rebuild all indexes on the Sales.Orders table, but the job fails. What is the error in the JSON configuration?
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
✓
The command is missing a semicolon at the end.
The T-SQL command 'ALTER INDEX ALL ON Sales.Orders REBUILD' must end with a semicolon to be valid in an Azure Elastic Job step. Without the semicolon, the job fails. Option B is incorrect because the target group type for a single database is 'SqlDatabase'. Option C is incorrect because 'ALTER INDEX ... REBUILD' is the correct syntax. Option D is incorrect because there is no version incompatibility.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The command is missing a semicolon at the end.
Why this is correct
T-SQL statements should end with a semicolon in elastic job steps.
- ✗
The target group should specify 'SqlServer' type instead of 'SqlDatabase'.
Why it's wrong here
The target group correctly specifies the database.
- ✗
The command should be 'REBUILD INDEX' instead of 'ALTER INDEX'.
Why it's wrong here
'ALTER INDEX ... REBUILD' is correct syntax.
- ✗
The job agent version is incompatible with the command.
Why it's wrong here
Job agent version does not affect T-SQL commands.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DP-300 question from scratch — 906 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.