The answer is that the elastic job step fails because the T-SQL command is missing a semicolon at the end. In SQL Server and Azure SQL Database, certain statements like `ALTER INDEX ALL ON Sales.Orders REBUILD` require a terminating semicolon to be considered a complete batch, and the elastic job agent strictly parses the JSON configuration for valid T-SQL syntax. This tests your understanding of how Azure Elastic Jobs execute scripts—the `command` property must contain a fully terminated T-SQL statement, not just a syntactically correct fragment. On the DP-300 exam, this is a common trap where candidates focus on index syntax or agent versioning but overlook the missing semicolon, which is the precise error in the JSON. Remember the memory tip: "Every T-SQL command in an elastic job step needs its period—the semicolon."
DP-300 Configure and manage automation of tasks Practice Question
This DP-300 practice question tests your understanding of configure and manage automation of tasks. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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 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 'ALTER INDEX ALL' command should have a semicolon at the end. While not strictly required, the more likely issue is that the command is missing the semicolon. However, the real error is that the 'command' property should be a T-SQL script, and 'ALTER INDEX ALL ON Sales.Orders REBUILD' is missing the semicolon. Option A is wrong because the syntax is mostly correct. Option C is wrong because the command is correct syntactically. Option D is wrong because the job agent does not require a specific version.
Key principle: NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
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.
Related concept
Static NAT maps one inside address to one outside address.
✗
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.
Common exam traps
Common exam trap: NAT rules depend on direction and matching traffic
NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.
Trap categories for this question
Command / output trap
Job agent version does not affect T-SQL commands.
Detailed technical explanation
How to think about this question
NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.
KKey Concepts to Remember
Static NAT maps one inside address to one outside address.
PAT allows many inside hosts to share one public address using ports.
Inside local and inside global describe the private and translated addresses.
NAT ACLs identify traffic for translation, not always security filtering.
TExam Day Tips
→Identify inside and outside interfaces first.
→Check whether the scenario needs static NAT, dynamic NAT or PAT.
→Do not confuse NAT matching ACLs with normal packet-filtering intent.
Key takeaway
NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. NAT direction and interface roles matter as much as the IP address mapping. Inside/outside designation controls which traffic is translated. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this DP-300 question in full detail.
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related DP-300 NAT questions on configuration and troubleshooting.
Configure and manage automation of tasks — This question tests Configure and manage automation of tasks — Static NAT maps one inside address to one outside address..
What is the correct answer to this question?
The correct answer is: The command is missing a semicolon at the end. — The 'ALTER INDEX ALL' command should have a semicolon at the end. While not strictly required, the more likely issue is that the command is missing the semicolon. However, the real error is that the 'command' property should be a T-SQL script, and 'ALTER INDEX ALL ON Sales.Orders REBUILD' is missing the semicolon. Option A is wrong because the syntax is mostly correct. Option C is wrong because the command is correct syntactically. Option D is wrong because the job agent does not require a specific version.
What should I do if I get this DP-300 question wrong?
Review the four NAT address types (inside local, inside global, outside local, outside global), PAT port overload, and static vs dynamic NAT use cases. Then practise related DP-300 NAT questions on configuration and troubleshooting.
What is the key concept behind this question?
Static NAT maps one inside address to one outside address.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.