正解:A
Basic Concept: This question tests performance optimization for SQL workloads, including Query Store, automatic tuning, index/statistics maintenance, and engine-level resource behavior.
Why A is Correct: Azure Automation runbooks execute PowerShell or Python tasks on a schedule, making them useful for Azure SQL maintenance workflows. This fits the case because the requested outcome is: You need to schedule the statement to run once daily against each database by using Transact-SQL commands.
The selected feature addresses that outcome directly rather than relying on a workaround.
Why B is Wrong: Elastic Jobs automate T-SQL execution across many Azure SQL databases, especially for multi-tenant or shard-style deployments. It does not provide the required repeatable execution, scheduling, or deployment automation requirement, so it would not complete the administrative workflow reliably.
Why C is Wrong: SQL Server Agent schedules and runs SQL Server jobs; in Azure SQL Database, Elastic Jobs or Azure Automation are often used instead. It belongs to a different step of operations; this question needs the mechanism that can run or deploy the task repeatedly.
Why D is Wrong: an Azure function can participate in administration workflows, but automation questions require the mechanism that can execute repeatable tasks with the correct scope and schedule. It would leave too much manual work or would operate at the wrong scope for the requested automation.