DP-300 practice question 29 of 35

You have four Azure subscriptions. Each subscription contains multiple Azure SQL databases. You need to update the column and index statistics for the databases. What should you use?

Full set: 407 questions

Domain Monitor, configure, and optimize database resources

Answer options
A: an Azure Automation runbook Correct answer
B: a SQL Agent job
C: Azure SQL Analytics
D: automatic tuning in Azure SQL Database
Correct Answer:
A. an Azure Automation runbook
Explanation

Azure Automation provides a cloud-based service to automate administrative tasks across Azure and non-Azure environments. To update statistics for multiple Azure SQL databases spread across several subscriptions, an Azure Automation runbook is the most suitable solution. A PowerShell runbook can be created to iterate through the subscriptions and databases, connect to each one, and execute T-SQL commands (e.g., spupdatestats or UPDATE STATISTICS). This approach offers a centralized, schedulable, and scalable method for performing maintenance tasks that span multiple resources and subscriptions.

Why Incorrect

B. a SQL Agent job: SQL Server Agent is not an available feature in the Azure SQL Database PaaS service. It is only available in Azure SQL Managed Instance and SQL Server on Azure VMs.
C. Azure SQL Analytics: Azure SQL Analytics (now part of Azure Monitor for SQL) is a monitoring and performance analysis solution. It is used to collect and visualize performance data, not to execute administrative tasks like updating statistics.
D. automatic tuning in Azure SQL Database: The automatic tuning feature in Azure SQL Database focuses on query execution plan correction (FORCELASTGOODPLAN) and index management (CREATEINDEX, DROPINDEX). It does not perform proactive, scheduled updates of column and index statistics.

References

1. Azure Automation for SQL Management:

Microsoft Docs

"Tutorial: Automate SQL scripts against Azure SQL Database by using Azure Automation". This tutorial demonstrates the exact scenario of using a runbook to execute T-SQL scripts against an Azure SQL Database.

Microsoft Docs

"Manage resources in multiple subscriptions or resource groups". This document explains how Azure Automation can manage resources across different subscriptions by using a Run As account or managed identity with appropriate permissions.

2. Absence of SQL Agent in Azure SQL Database:

Microsoft Docs

"What is Azure SQL Database? - Feature comparison". The feature comparison table explicitly shows that SQL Server Agent is not available for SQL Database single databases and elastic pools.

Microsoft Docs

"Automate management tasks using elastic jobs (preview)". This document introduces Elastic Jobs as the alternative to SQL Agent for Azure SQL Database

further confirming SQL Agent's absence. However

for cross-subscription tasks

Azure Automation is a more robust and integrated solution.

3. Purpose of Azure SQL Analytics:

Microsoft Docs

"Monitor Azure SQL Database using Azure SQL Analytics (Preview) in Log Analytics". This article describes the solution as a tool to "monitor the performance of all of your Azure SQL databases at scale and across multiple subscriptions." It is clearly defined as a monitoring

not an execution

tool.

4. Scope of Automatic Tuning:

Microsoft Docs

"Automatic tuning in Azure SQL Database and Azure SQL Managed Instance". This official documentation details the available automatic tuning options

which are limited to automatic plan correction and automatic index management. It makes no mention of managing statistics updates.

Scroll to Top