DP-300 Configure and manage automation of tasks Practice Question
A database administrator manages an Azure SQL Managed Instance that hosts a mission-critical database. The administrator needs to automate the execution of a T-SQL script that performs index maintenance and then sends an email notification with the results. The solution must use native Azure SQL Managed Instance capabilities and minimize external dependencies. Which two actions should the administrator perform? (Choose two.)
⚠ Common exam trap
The trap here is assuming that Azure SQL Managed Instance lacks SQL Server Agent and Database Mail, which are actually available.
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
✓
Configure Database Mail on the Managed Instance and add a notification step to the job.
SQL Server Agent and Database Mail are both supported natively on Azure SQL Managed Instance. Using a SQL Server Agent job with a T-SQL step and a notification step satisfies the automation and email requirements while keeping the solution self-contained on the instance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Configure a Logic App that triggers on a schedule and sends an email via Office 365.
Why it's wrong here
A Logic App can schedule and send email, but it would not run the T-SQL script natively on the Managed Instance unless additional connectors are configured. This adds external dependencies and does not use the native SQL Server Agent capabilities available on Managed Instance.
- ✗
Create an Elastic Database Job that targets the Managed Instance database.
Why it's wrong here
Elastic Database Jobs is designed for Azure SQL Database, not for Azure SQL Managed Instance. Although some cross-service scenarios exist, it is not the native automation mechanism for Managed Instance and would not leverage the built-in SQL Server Agent.
- ✗
Deploy an Azure Automation runbook that connects to the Managed Instance and runs the script.
Why it's wrong here
Azure Automation runbooks can execute T-SQL, but they require an Automation account, credentials, and network connectivity to the Managed Instance. This introduces external dependencies and is unnecessary because SQL Server Agent and Database Mail are natively available on Managed Instance.
- ✓
Configure Database Mail on the Managed Instance and add a notification step to the job.
Why this is correct
Database Mail is supported on Azure SQL Managed Instance and can be configured with an SMTP account. Adding a notification step to the SQL Server Agent job allows the job to send email results directly from the instance, meeting the notification requirement without external services.
- ✓
Create a SQL Server Agent job with a T-SQL step that runs the index maintenance script.
Why this is correct
Azure SQL Managed Instance includes SQL Server Agent, so a job with a T-SQL step can run the maintenance script natively. This satisfies the need to automate T-SQL execution without external dependencies and is the standard scheduling mechanism on Managed Instance.
Go deeper
Related to this question
Learn chapter
Configuring Automation Tasks for Database Administration
Key term
Azure SQL Managed Instance
Azure SQL Managed Instance is a fully managed cloud database service that gives you nearly all the features of Microsoft SQL Server on your own server, without you having to manage the hardware or operating system.
About these practice questions
Courseiva writes every DP-300 question from scratch — 574 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
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.