Q01 - Question
You must use Kusto queries in a Log Analytics workspace to list the status of runbook jobs in an Azure Automation account. You have not yet configured any settings on the Automation account. What should you do first?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. Link the Automation account to the Log Analytics workspace.
- B. Configure Diagnostic settings for the Automation account to send logs to the workspace.
- C. Create a metric alert rule that uses the Total Jobs signal.
- D. Query the jobs.job_executions view in the job database.
B is correct.
Explanation: Azure Automation can send runbook job status and job streams to a Log Analytics workspace. Before you query Automation job data in Log Analytics, you must configure Diagnostic settings for the Automation account.
A is incorrect: Sending job status and job streams to Log Analytics is independent and does not require workspace linking.
C is incorrect: A metric alert rule notifies you when a condition is met, such as a threshold on Total Jobs. It does not make job data available for Kusto queries.
D is incorrect: The jobs.job_executions view reports elastic job executions in the job database. It does not contain Azure Automation runbook jobs.
Q02 - Question
You plan a Logic Apps workflow that runs when a row is inserted in an Azure SQL Database table. You want to use the built-in SQL Server connector, which runs in the same process as the Logic Apps runtime. Which workflow type should you use?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. A Standard workflow in single-tenant Azure Logic Apps
- B. A Consumption workflow in multitenant Azure Logic Apps
- C. An Azure Automation runbook that imports the Az.SQL module
- D. An elastic job agent with a target group
A is correct.
Explanation: In single-tenant Azure Logic Apps, Standard workflows can use the SQL Server connector as a managed connector or as a built-in connector. The built-in connector supports triggers, such as when a row is inserted, and actions such as Execute query and Get rows. The connector supports Azure SQL Database.
B is incorrect: In multitenant Azure Logic Apps, Consumption workflows can use this connector only as a managed connector. They do not have the built-in connector.
C is incorrect: A runbook runs PowerShell or Python code. It is not a Logic Apps workflow and does not use the built-in SQL Server connector.
D is incorrect: Elastic jobs run T-SQL scripts against a target group, either once or on a schedule. They do not provide a built-in connector trigger for row inserts.
Q03 - Question
Your team wants SQL Server to start a database consistency check automatically when storage errors 823, 824, or 825 occur. The response is a well-known condition that does not need manual intervention. Which configuration meets the requirement?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. Configure the existing job to send a notification to an operator only when the job succeeds.
- B. Create an operator for the email group and send an email each time an error is logged.
- C. Create an alert for errors 823, 824, and 825 that executes a SQL Server Agent job that performs a consistency check.
- D. Add a Maintenance Cleanup task to the maintenance plan.
C is correct.
Explanation: An alert can respond to an error condition by executing another SQL Server Agent job. This fits well-known conditions, such as storage errors 823, 824, and 825, that can be handled without manual intervention. The job can perform a database consistency check.
A is incorrect: A job success notification only informs an operator after the job finishes. It does not respond to storage errors.
B is incorrect: An email notification informs a person. A person must still start the consistency check, so the response is not automatic.
D is incorrect: The Maintenance Cleanup task removes old maintenance plan files, such as text reports and backup files. It does not run a consistency check.
Q04 - Question
Your company plans to move a database to Azure. The database needs scheduled maintenance jobs, operators, and alerts that are managed by SQL Server Agent. Which deployment option should you choose?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. Azure SQL Managed Instance
- B. Azure SQL Database, and schedule the jobs with SQL Server Agent
- C. Azure SQL Database, and use a maintenance plan to schedule the jobs
- D. Azure SQL Database, and use SQL Server Agent operators for alert notifications
A is correct.
Explanation: SQL Server Agent is available on SQL Server and Azure SQL Managed Instance. It is not available on Azure SQL Database. Azure SQL Managed Instance is the option that supports SQL Server Agent jobs, operators, and alerts.
B is incorrect: SQL Server Agent is not available on Azure SQL Database, so you cannot schedule jobs with it there.
C is incorrect: Maintenance plan activities run as SQL Server Agent jobs. Without SQL Server Agent, a maintenance plan cannot schedule them.
D is incorrect: Operators and alerts are SQL Server Agent objects. They are not available when SQL Server Agent is not available.
Q05 - Question
You want a SQL Server Agent job to send an email message to your database team when the job fails. Which two actions are required? Select two.
Domain: Configure and manage automation of tasks (15–20%) Type: Multiple choice
- A. Create an operator that maps to the team's email group.
- B. Create a performance condition alert for CPU utilization.
- C. Enable the SQL Server Agent email profile.
- D. Add an Execute SQL Server Agent job task to a maintenance plan.
A and C are correct.
Explanation: A job notification depends on an existing operator. An operator is an alias with contact information, typically an email group. To send email to an operator, you must also enable the SQL Server Agent email profile.
B is incorrect: A performance condition alert responds to metrics such as CPU utilization. It is not required to notify an operator when a job fails.
D is incorrect: The Execute SQL Server Agent job task runs a user-defined job. It does not send a failure notification.
Q06 - Question
You manage several Azure SQL databases on one logical server. You create an elastic job agent and a job database. You add the server to a target group so that a job runs T-SQL against all databases on that server. The job agent must be able to enumerate the databases on the server. Which credential must you create?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. A credential that exists only in the job database
- B. A database credential in each target database only
- C. A credential in the master database of the target server
- D. A credential in the msdb database of the target server
C is correct.
Explanation: When the target is a server or an elastic pool, you create a credential in the master database of that server or pool. The job agent uses it to enumerate the databases. Give the credential only the privileges that the job step needs.
A is incorrect: The documented requirement is a credential in the master database of the target server. A credential in the job database alone does not meet that requirement.
B is incorrect: A database credential alone is enough only when the target is a single database. A server target also needs the master database credential.
D is incorrect: Azure SQL Database does not have the msdb database or SQL Server Agent, so you cannot create the credential there.
Q07 - Question
You create a PowerShell runbook that uses Connect-AzAccount -Identity to sign in with the system-managed identity of an Automation account. The runbook then queries an Azure SQL Database. Transient issues can interrupt the runbook. Select TWO actions that you must take to help the runbook run reliably.
Domain: Configure and manage automation of tasks (15–20%) Type: Multi-select
- A. Rely on Azure Automation to resume an interrupted runbook at the last completed statement.
- B. Enable appropriate RBAC permissions for the system identity of the Automation account.
- C. Import only the Az.SQL module, because it does not depend on the Az.Accounts module.
- D. Write the runbook logic so that it supports being restarted from the beginning.
B and D are correct.
Explanation: The runbook signs in with the system identity, so that identity needs appropriate RBAC permissions. Without them, the runbook might fail. If a runbook is interrupted, Azure Automation restarts it at the beginning, so you must write the logic to support a restart.
A is incorrect: An interrupted runbook restarts at the beginning. It does not resume at the last completed statement.
C is incorrect: The Az.SQL module depends on the Az.Accounts module. Import Az.Accounts first, and then import Az.SQL.
Q08 - Question
A virtual machine that hosts SQL Server is kept in a stopped state to save cost. Each night, you must start the VM, run a SQL Server backup, and shut the VM down again. You want to use one automation service to manage the VM and run the backup. Which approach should you use?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. An elastic job that runs T-SQL scripts against a target group
- B. A Logic Apps workflow that uses the SQL Server connector Get row action
- C. SQL Server Agent on an Azure SQL Database
- D. Azure Automation with a hybrid runbook
D is correct.
Explanation: Azure Automation can manage resources in Azure or on VMs. You can use it with hybrid runbooks to start a VM, perform a SQL Server backup, and then shut the VM down. A schedule linked to the runbook triggers it at a specific time.
A is incorrect: Elastic jobs run only T-SQL scripts. They cannot start or shut down a VM.
B is incorrect: The SQL Server connector actions work with SQL data, such as getting rows, running queries, and running stored procedures. They are not the documented way to start and stop a VM.
C is incorrect: Azure SQL Database does not provide the msdb database or SQL Server Agent. SQL Server Agent also does not manage the power state of a VM.
Q09 - Question
A production SQL Server instance runs DBCC CHECKDB weekly and takes nightly backups. The backup volume is nearly full. A teammate proposes deleting older backups more aggressively. Which approach protects your ability to recover from corruption that the weekly consistency check might find?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. Delete each older backup as soon as a new backup finishes, because a backup operation detects corruption.
- B. Run the Shrink database task after each backup to reduce the size of the backup files.
- C. Use the Cleanup history task to remove old backup files from disk.
- D. Keep backups for longer than the consistency check window, and complete a consistency check before you discard earlier backups.
D is correct.
Explanation: The backup retention period must be longer than the consistency check window. A backup operation does not detect corruption, so a backup file can contain corruption. Complete a consistency check before you discard earlier backups so you do not carry corruption forward.
A is incorrect: A backup operation does not detect corruption. Deleting older backups immediately can leave you with no clean backup to restore.
B is incorrect: The Shrink database task reduces a database or log file. It does not reduce backup file size. It also causes severe index fragmentation and is I/O and CPU intensive, so it is not recommended in regular maintenance.
C is incorrect: The Cleanup history task deletes backup and restore history and SQL Server Agent job history from msdb. Use the Maintenance Cleanup task to remove old backup files.
Q10 - Question
You are creating a deployment script that uses Azure CLI. The script must deploy a Bicep file that is stored at a remote URI. Which approach should you use?
Domain: Configure and manage automation of tasks (15–20%) Type: Single choice
- A. Use the Bicep CLI to compile the file into a JSON template, and then deploy the JSON template from the remote location.
- B. Run the az deployment group create command and pass the URI of the remote Bicep file directly.
- C. Run the az account set command and specify the URI of the remote Bicep file.
- D. Run the az sql server create command and specify the URI of the remote Bicep file.
A is correct.
Explanation: Azure CLI does not support deploying remote Bicep files directly by URI. To deploy a remote Bicep file, you must first compile it into a JSON template by using the Bicep CLI, and then deploy the JSON template from a remote location.
B is incorrect: Azure CLI supports deploying local Bicep files directly with az deployment group create, but it does not support deploying remote Bicep files directly by URI.
C is incorrect: The az account set command is used to switch between subscriptions. It does not deploy a template file.
D is incorrect: The az sql server create command creates a logical server using inline parameters. It does not deploy a Bicep file.