Question 290
A deployment job has Contributor on an Azure resource group but fails its SQL table modifications because no database principal was granted access. Which Azure SQL or SQL Server administrative approach is MOST appropriate?
Explanation
Correct Answer
Use Az PowerShell or Azure CLI in authenticated deployment workflows with the minimum Azure RBAC rights and explicit resource/subscription selection to manage approved SQL resources. This is the supported administration mechanism for the described workload. Azure RBAC permissions to create an Azure SQL server do not imply arbitrary T-SQL data access to every user database. Verify with: Review subscription context, service principal or managed identity, Azure RBAC role, API response, database resource state and script error handling.
Incorrect Answers
Monitor Azure resource deployments and resolve failed dependencies or policy denials using logs and change review, with safe rollback plans for data-bearing SQL resources. This addresses Deployment monitoring rollback and drift reconciliation, not the controlling requirement here. Rolling back an infrastructure template is not identical to restoring committed database transactions, and destructive replacements require explicit protection. Prefer: Use Az PowerShell or Azure CLI in authenticated deployment workflows with the minimum Azure RBAC rights and explicit resource/subscription selection to manage approved SQL resources.
Use ARM or Bicep to define Azure SQL servers, databases, identity, networking and policy settings in source-controlled templates with environment parameters and gated deployment checks. This addresses ARM and Bicep declarative Azure SQL provisioning, not the controlling requirement here. A valid ARM deployment may still produce unsafe security settings if templates use broad defaults or incorrect resource group/subscription targets. Prefer: Use Az PowerShell or Azure CLI in authenticated deployment workflows with the minimum Azure RBAC rights and explicit resource/subscription selection to manage approved SQL resources.
Use Azure SQL elastic jobs for supported scheduled T-SQL maintenance across Azure SQL Database targets, managing target groups, credentials and job execution state. This addresses Azure SQL Database elastic jobs for fleet maintenance, not the controlling requirement here. Elastic jobs are a separate managed job-agent service and should not be confused with SQL Server Agent jobs inside Azure SQL Database. Prefer: Use Az PowerShell or Azure CLI in authenticated deployment workflows with the minimum Azure RBAC rights and explicit resource/subscription selection to manage approved SQL resources.


