Courseiva

Microsoft Azure Database Administrator Associate DP-300 (DP-300) — Questions 1–75

574 questions total · 8pages · All types, answers revealed

Page 1 of 8

Page 2
1
MCQeasy

You are managing an Azure SQL Database that hosts a customer relationship management (CRM) application. The database has a table named 'Contacts' with columns: ContactID (int, primary key), Name (nvarchar(100)), Email (nvarchar(200)), Phone (nvarchar(20)), and CreditLimit (decimal(18,2)). The compliance team requires that the CreditLimit column be encrypted so that only authorized users can view it. The application must be able to search for exact matches on CreditLimit values. You need to implement encryption without changing the application code significantly. Which encryption method should you use?

A.Always Encrypted with randomized encryption
B.Always Encrypted with deterministic encryption
C.Transparent Data Encryption
D.Dynamic Data Masking
AnswerB

Deterministic encryption produces the same ciphertext for identical plaintext, enabling equality searches on CreditLimit through the Always Encrypted-enabled driver. Randomised encryption would block exact-match queries, and application code changes stay minimal since the driver handles encryption transparently.

Why this answer

Always Encrypted with deterministic encryption is correct because it encrypts the CreditLimit column at the client driver level, ensuring data remains encrypted at rest and in transit, while still allowing exact-match searches (e.g., WHERE CreditLimit = 5000) since deterministic encryption always produces the same ciphertext for a given plaintext. This meets the compliance requirement without requiring significant application code changes, as the Azure SQL Database driver handles encryption and decryption transparently for authorized users.

Exam trap

The trap here is that candidates confuse Dynamic Data Masking with encryption, thinking masking satisfies compliance requirements, but masking is a presentation-layer feature that does not protect data from privileged users or direct database access.

How to eliminate wrong answers

Option A is wrong because randomized encryption produces different ciphertext for the same plaintext each time, which prevents equality searches (e.g., WHERE CreditLimit = 5000) and thus fails the application requirement for exact-match queries. Option C is wrong because Transparent Data Encryption (TDE) encrypts the entire database at rest but does not provide column-level granularity or restrict access to specific columns; it protects against physical theft of files, not unauthorized viewing by database users. Option D is wrong because Dynamic Data Masking obfuscates data at query results but does not encrypt the underlying data; it can be bypassed by users with direct access to the database or through inference attacks, failing the compliance requirement for encryption.

2
MCQmedium

You administer an Azure SQL Database that uses the General Purpose tier. Users report that queries are slow during peak hours. You need to identify if the slow performance is due to log write latency. Which metric should you examine in Azure Monitor?

A.Log IO percent
B.Transaction log usage
C.Average IO latency
D.Log write latency
AnswerD

Log write latency directly measures the time taken to write transaction log records to durable storage, which is the precise bottleneck causing slow queries during peak hours in the General Purpose tier. Examining this metric in Azure Monitor isolates whether log throughput, not CPU or data I/O, constrains performance.

Why this answer

The correct metric to examine is Log write latency (option D), as it directly measures the time taken to write to the transaction log, which can indicate slow performance due to log write latency. Option A (Log IO percent) measures the percentage of log throughput used, not latency. Option B (Transaction log usage) measures log file space used, not performance.

Option C (Average IO latency) includes both data and log I/O, so it is not specific to log writes.

3
Multi-Selecteasy

Which TWO disaster recovery options are available for Azure SQL Database? (Choose two.)

Select 2 answers
A.Database mirroring.
B.Auto-failover groups.
C.Always On availability groups.
D.Log shipping.
E.Active geo-replication.
AnswersB, E

Auto-failover groups provide automated geo-replication across Azure regions, enabling a secondary server to take over if the primary fails. This satisfies the disaster recovery requirement by delivering cross-region failover for Azure SQL Database, including read-write listener endpoints that redirect connections without manual intervention.

Why this answer

Active geo-replication and auto-failover groups are the two primary disaster recovery options for Azure SQL Database. Active geo-replication provides asynchronous replication of a database to a secondary region, while auto-failover groups extend this by allowing failover of multiple databases and providing read-only endpoints. Options A (database mirroring) and D (log shipping) are not supported for Azure SQL Database.

Option C (Always On availability groups) is a feature for SQL Server on Azure VMs, not for Azure SQL Database.

4
MCQeasy

You are monitoring an Azure SQL Database using dynamic management views (DMVs). You run a query against `sys.dm_exec_query_stats` to find the top 10 queries by total worker time. Several queries show high worker time but low logical reads. The database is not experiencing any blocking or deadlocks. What is the most likely cause of the high worker time?

A.The queries suffer from parameter sniffing leading to suboptimal plans.
B.The queries are experiencing memory pressure causing excessive lazy writes.
C.The queries are waiting on transaction log writes.
D.The queries are CPU-bound due to inefficient query plans.
AnswerD

High worker time with low logical reads indicates CPU consumption rather than I/O. Inefficient plans, such as scans, bad cardinality estimates or missing indexes causing repeated CPU-heavy operations, burn worker time without many page reads, and no blocking or deadlocks were reported.

Why this answer

High worker time (CPU time) with low logical reads indicates that the queries are CPU-bound rather than I/O-bound. Inefficient query plans, such as those with large hash joins, sorts, or non-sargable predicates, can cause excessive CPU consumption without generating many logical reads. Option A is incorrect because parameter sniffing typically leads to varying plan quality, but the consistent high worker time across multiple queries suggests a systematic plan efficiency issue, not necessarily parameter sniffing.

Option B is incorrect because memory pressure would cause increased I/O activity (lazy writes) which is not observed with low logical reads. Option C is incorrect because transaction log writes are I/O operations and would not cause high worker time with low I/O.

5
MCQmedium

You are the database administrator for a SQL Server 2019 instance on Azure Virtual Machines. The instance hosts a database that must be available during a planned operating system update that requires a restart of the virtual machine. You need to ensure that the database remains online with minimal downtime. What should you do?

A.Enable Azure Site Recovery for the virtual machine.
B.Configure an Always On availability group with a synchronous secondary replica on a second VM.
C.Use the SQL Server IaaS Agent extension to apply the update without restarting.
D.Create a database snapshot and restore it after the update.
AnswerB

An Always On availability group with a synchronous secondary replica allows you to perform a manual failover to the secondary before restarting the primary VM. The database remains online on the secondary, and after the primary VM restarts, you can fail back. This provides minimal downtime during the planned OS update, meeting the requirement.

Why this answer

To keep the database online during a planned OS update that requires a VM restart, you should use an Always On availability group with a synchronous secondary replica. Before restarting the primary VM, you manually fail over to the secondary, which becomes the new primary and keeps the database online. After the update, you can fail back.

Other options either cause downtime or are not suitable for this scenario.

Exam trap

The trap here is assuming that Azure Site Recovery or IaaS extension patching can avoid downtime, when only a high-availability solution like an availability group can keep the database online during a VM restart.

6
MCQhard

You manage an Azure SQL Database named SalesDB in the East US region. The database is in the Business Critical service tier. You need to implement a disaster recovery strategy that provides a recovery point objective (RPO) of less than 5 seconds and a recovery time objective (RTO) of less than 30 seconds during a regional outage. You configure an auto-failover group with a secondary server in the West US region. Which action should you take to meet the RPO and RTO requirements?

A.Enable geo-replication for SalesDB to the secondary server.
B.Set the secondary database to read-only mode.
C.Increase the backup retention period for SalesDB.
D.Configure the failover group to use automatic failover policy.
AnswerD

An auto-failover group with automatic failover policy enables Azure to automatically fail over to the secondary region if the primary region becomes unavailable. This provides a low RTO because failover is automatic and typically completes within 30 seconds. The RPO is also low because the secondary is continuously synchronized. This is the correct action to meet the RPO and RTO requirements.

Why this answer

To achieve an RPO of less than 5 seconds and an RTO of less than 30 seconds during a regional outage, the auto-failover group must be configured with an automatic failover policy. This enables Azure to automatically promote the secondary to primary, minimizing downtime. Geo-replication requires manual failover and may not meet the RTO, while read-only mode and backup retention do not affect failover performance.

Exam trap

The trap here is confusing geo-replication with auto-failover groups; geo-replication does not provide automatic failover and may not meet strict RTO requirements.

7
MCQhard

You manage an Azure SQL Database that experiences blocking. You need to identify the blocking chain and the T-SQL statements involved in the blocking. Which dynamic management view (DMV) should you query?

A.sys.dm_exec_requests
B.sys.dm_exec_requests joined with sys.dm_exec_sql_text and sys.dm_exec_sessions
C.sys.dm_exec_input_buffer
D.sys.dm_os_waiting_tasks
AnswerB

To identify the blocking chain and the T-SQL statements involved, you should query sys.dm_exec_requests to get the blocking_session_id, join it with sys.dm_exec_sql_text to retrieve the SQL text using the sql_handle, and optionally join with sys.dm_exec_sessions for session details. This combination provides the blocking session, the blocked session, and the statements they are executing, giving a complete view of the blocking scenario.

Why this answer

The most effective way to diagnose blocking in Azure SQL Database is to query sys.dm_exec_requests, which includes the blocking_session_id column. By joining this DMV with sys.dm_exec_sql_text on the sql_handle, you can retrieve the T-SQL text for both the blocking and blocked requests. Adding sys.dm_exec_sessions provides additional context like login name and host.

This combination reveals the full blocking chain and the statements involved.

Exam trap

The trap here is thinking that a single DMV like sys.dm_os_waiting_tasks provides the full T-SQL text, when in fact you need to join multiple DMVs to get both the blocking chain and the statements.

8
MCQmedium

You are monitoring an Azure SQL Database using the sys.dm_db_resource_stats DMV. The avg_log_write_percent column shows 95% for the last hour. What does this indicate, and what should you do?

A.The database is out of transaction log space; increase the max log size.
B.The database storage is running out; scale up storage.
C.The database is nearing its log write IOPS limit; consider scaling up or optimizing log writes.
D.The CPU is overloaded; scale up CPU.
AnswerC

The avg_log_write_percent column measures log write throughput as a percentage of the database's provisioned limit. At 95%, the database is approaching its log write IOPS ceiling, risking throttling. Scaling up the service tier or SKU raises that limit, while optimising log-heavy operations reduces demand, directly addressing the sustained near-saturation constraint.

Why this answer

The avg_log_write_percent metric in sys.dm_db_resource_stats measures the percentage of the log write IOPS limit used. At 95%, the database is nearing its log write IOPS limit, which can cause transaction delays and throttling. The appropriate response is to scale up the service tier (e.g., to a higher DTU or vCore level) or optimize log writes to reduce IOPS consumption.

Option A is incorrect because the metric does not indicate running out of log space; log space is separate. Option B is incorrect because storage scale (size) does not directly affect log write IOPS. Option D is incorrect because this metric is specifically about log I/O, not CPU.

9
MCQeasy

Your company wants to ensure business continuity for an Azure SQL Database that is used by a critical application. The database must remain available in the event of a single availability zone failure within a region. Which configuration should you use?

A.Configure zone-redundant availability for the database
B.Use active geo-replication to a different region
C.Deploy the database with locally redundant storage
D.Configure read scale-out with a secondary replica
AnswerA

Zone-redundant configuration replicates the database across multiple availability zones within the region, so a single zone failure leaves a replica serving traffic. This directly satisfies the stem's requirement for continuity during one availability zone outage.

Why this answer

Zone-redundant availability for Azure SQL Database replicates the database across multiple availability zones within a region, providing high availability if one zone fails. This ensures the database remains available during a single zone outage, meeting the business continuity requirement.

Exam trap

The trap is confusing zone redundancy with geo-replication; candidates might pick geo-replication for zone failures, but it is designed for regional disasters.

How to eliminate wrong answers

Option B is wrong because active geo-replication is for cross-region disaster recovery, not for zone-level failures within a region. Option C is wrong because locally redundant storage replicates data within a single zone, so a zone failure would cause an outage. Option D is wrong because read scale-out provides a read-only replica but does not guarantee high availability in case of a zone failure; it is for offloading read workloads.

10
MCQhard

You have a SQL Server on Azure VM running a mission-critical database. The VM is configured with Azure Site Recovery (ASR) for disaster recovery. During a disaster recovery drill, you notice that the recovered database is not consistent. What is the most likely cause?

A.The secondary region is not in the same geo as the primary.
B.Application-consistent snapshots are not enabled in the ASR replication policy.
C.The backup retention period is too short.
D.The database is not part of an Always On availability group.
AnswerB

ASR's default crash-consistent snapshots capture the disk state without flushing in-memory writes or quiescing the database, so a recovered SQL Server may need crash recovery and appear inconsistent. Enabling application-consistent snapshots, via VSS, produces a transactionally consistent recovery point.

Why this answer

Azure Site Recovery replicates VM disks, and by default it takes crash-consistent snapshots, which capture the disk state as if the power were cut — the database may have in-flight transactions and be inconsistent on recovery. Enabling application-consistent snapshots in the replication policy triggers VSS (Volume Shadow Copy Service) to quiesce the database and flush transactions before snapshotting, ensuring a consistent recovery point.

Exam trap

The trap is assuming ASR replication is automatically database-consistent; exams test whether candidates know that crash-consistent is the default and application-consistent snapshots must be explicitly enabled.

How to eliminate wrong answers

Option A is wrong because ASR requires the secondary region to be in the same geography (geo) for supported replication; cross-geo replication is not the cause of inconsistency and is generally not allowed for ASR. Option C is wrong because backup retention period relates to backup history, not to the consistency of ASR-replicated recovery points. Option D is wrong because Always On availability groups are a separate high-availability/DR mechanism; ASR can replicate a standalone SQL Server VM, and the absence of an AG does not by itself cause inconsistency — the snapshot consistency setting does.

11
MCQmedium

You are the database administrator for a healthcare organization that uses Azure SQL Database. You need to implement column-level encryption for a column containing patient Social Security numbers (SSNs). The SSNs must be encrypted at rest and in transit, and only authorized client applications should be able to decrypt them. Which technology should you use?

A.Row-level security (RLS) to restrict access based on user role.
B.Dynamic data masking (DDM) to mask SSNs for unauthorized users.
C.Transparent Data Encryption (TDE) with customer-managed keys.
D.Always Encrypted with column master key stored in Azure Key Vault.
AnswerD

Always Encrypted with the column master key in Azure Key Vault encrypts SSNs at rest and in transit, and only client applications with key access can decrypt them. Azure SQL Database never sees plaintext, satisfying the authorised-client constraint.

Why this answer

Always Encrypted is the correct choice because it ensures that sensitive data, such as SSNs, is encrypted both at rest and in transit, and the encryption keys are stored client-side (e.g., in Azure Key Vault). This design ensures that only authorized client applications with access to the column master key can decrypt the data, preventing even database administrators or cloud operators from viewing the plaintext values.

Exam trap

The trap here is that candidates often confuse Transparent Data Encryption (TDE) with column-level encryption, mistakenly thinking TDE protects data from all unauthorized access, when in fact TDE only encrypts data at rest and does not prevent authorized database users from reading sensitive columns in plaintext.

How to eliminate wrong answers

Option A is wrong because Row-Level Security (RLS) controls which rows a user can access based on predicates, but it does not encrypt data or protect it in transit; it only filters rows at query time. Option B is wrong because Dynamic Data Masking (DDM) obfuscates data for unauthorized users at the application layer but does not encrypt the underlying data, leaving it vulnerable to unauthorized decryption or exposure in backups and logs. Option C is wrong because Transparent Data Encryption (TDE) encrypts the entire database at rest but does not protect data in transit or prevent authorized database users (e.g., DBAs) from reading the plaintext SSNs; it also does not support client-side key control for granular column-level encryption.

12
MCQhard

You have an Azure SQL Managed Instance used for an e-commerce platform. During a flash sale, you experience a deadlock that causes transaction rollbacks. You need to minimize deadlock occurrences in the future. What should you implement?

A.Enable READ COMMITTED SNAPSHOT isolation level.
B.Configure deadlock graph in Extended Events.
C.Enable automatic tuning to force last good plan.
D.Increase the instance vCores to improve concurrency.
AnswerA

READ COMMITTED SNAPSHOT uses row versioning in tempdb, so readers don't take shared locks on data pages. This removes the shared-versus-exclusive lock conflicts that cause deadlocks during concurrent flash-sale transactions, satisfying the requirement to minimise deadlock occurrences.

Why this answer

Enabling READ COMMITTED SNAPSHOT isolation (RCSI) makes readers use row versioning from tempdb instead of taking shared locks, which eliminates the classic reader-writer deadlock pattern that plagues e-commerce workloads mixing SELECTs and UPDATEs. This directly reduces deadlock frequency without changing application code.

Exam trap

DP-300 often tests the misconception that monitoring tools (deadlock graphs, Extended Events) or more resources (vCores) prevent deadlocks, when only isolation-level or access-pattern changes actually reduce them.

How to eliminate wrong answers

Option B is wrong because a deadlock graph in Extended Events is a diagnostic/monitoring tool — it captures what happened but does not prevent future deadlocks. Option C is wrong because forcing the last good plan addresses plan regressions and parameter sniffing, not lock-based deadlocks. Option D is wrong because adding vCores increases throughput but does not change lock acquisition order or eliminate the shared-lock vs exclusive-lock conflicts that cause deadlocks.

13
MCQhard

You are configuring an elastic job in Azure SQL Database to run a T-SQL script on all databases within an elastic pool. The script must run on a schedule. You have already created the job agent, job, and target group. You need to ensure that the job step executes against every database in the pool, including databases added later. What should you configure for the target group?

A.Set the target group to include the logical server, and set the job step to target that group.
B.Add each database individually to the target group and update the group when new databases are added.
C.Set the target group to include the elastic pool, and set the job step to target that group.
D.Create a separate job for each database and schedule them individually.
AnswerC

Elastic job target groups can include an elastic pool as a target. When the job runs, the agent enumerates all databases in the pool at that time, so databases added later are automatically included. This satisfies the requirement to run on all current and future databases without manual updates.

Why this answer

Elastic job target groups can be defined at the elastic pool level. When the job executes, the agent resolves the target group to the current set of databases in the pool, so any database added afterward is included automatically. This provides dynamic, scalable targeting without manual updates.

Exam trap

The trap here is assuming that target groups are static lists, when they can be dynamic by targeting an elastic pool or server, which automatically includes new databases.

14
MCQmedium

You manage an Azure SQL Database that supports a critical web application. The database is currently configured with the General Purpose service tier and locally redundant backup storage. The compliance team requires that all backups be stored in a paired Azure region to ensure availability during a regional outage. You need to change the backup storage redundancy without affecting the database availability. What should you do?

A.Modify the database's backup storage redundancy setting to geo-redundant backup storage.
B.Configure active geo-replication to a secondary region and fail over the database.
C.Enable long-term retention (LTR) policies to copy backups to a separate storage account in the paired region.
D.Create a new database in the paired region and migrate all data by using transactional replication.
AnswerA

Azure SQL Database allows you to change the backup storage redundancy setting for a database to geo-redundant storage, which replicates backups to a paired region. This change can be made without taking the database offline and directly meets the compliance requirement. It is the supported method to alter where backups are stored.

Why this answer

Changing the backup storage redundancy setting to geo-redundant backup storage replicates backups to a paired Azure region. This operation is performed at the database or server level and does not require downtime. It directly fulfills the compliance requirement without adding unnecessary replication or migration steps.

Exam trap

The trap here is confusing disaster recovery features like active geo-replication with backup storage redundancy, which are separate mechanisms.

15
MCQhard

Your company uses Azure SQL Database with a server-level Microsoft Entra ID admin. You need to implement a solution where database-level roles are automatically assigned based on the user's group membership in Microsoft Entra ID. What should you use?

A.Use Azure RBAC to assign roles to the Entra ID groups.
B.Configure a SQL Server Agent job to update database roles based on group membership.
C.Create database users from Microsoft Entra ID groups and grant roles to those users.
D.Create a DDL trigger that assigns roles when users log in.
AnswerC

Creating contained database users mapped to Microsoft Entra ID groups lets role membership flow from group assignment, so permissions are granted automatically as users join or leave groups. This satisfies the requirement for automatic role assignment without per-user manual grants.

Why this answer

Azure SQL Database supports creating database users mapped to Microsoft Entra ID (formerly Azure AD) groups. By creating a user for the Entra ID group and then granting database roles to that group user, all members of the group automatically inherit the assigned permissions. This directly satisfies the requirement for role assignment based on group membership without custom scripting or triggers.

Exam trap

The trap here is that candidates confuse Azure RBAC (management-plane access) with database-level permissions (data-plane access), or assume that SQL Server Agent or DDL triggers are available in Azure SQL Database, leading them to choose options that are either not applicable or unsupported in the PaaS environment.

How to eliminate wrong answers

Option A is wrong because Azure RBAC controls access to Azure resources (e.g., the logical server or database) at the management plane, not database-level permissions within the SQL engine; it cannot assign database roles like db_datareader. Option B is wrong because SQL Server Agent is not available in Azure SQL Database (it is a PaaS service with no Agent support), and even if it were, polling group membership would be inefficient and not real-time. Option D is wrong because DDL triggers fire on schema changes (e.g., CREATE TABLE), not on login events; logon triggers are not supported in Azure SQL Database, and they cannot dynamically assign database roles based on group membership.

16
MCQeasy

You administer an Azure SQL Database named SalesDB in the East US region. The business requires that SalesDB remains available even if an entire Azure availability zone within East US fails. You need to configure the database so that replicas are automatically distributed across multiple availability zones with no application connection string changes. What should you do?

A.Enable zone redundancy for the database.
B.Configure an auto-failover group to a secondary region.
C.Enable read-scale out and point the application to the read-only replica.
D.Create an active geo-replication secondary in the same region.
AnswerA

Zone redundancy is the Azure SQL Database feature that automatically places compute and storage replicas across multiple availability zones inside the region. Enabling it requires no connection string changes because the same logical server endpoint is used. It protects against a single availability zone outage, which is exactly the requirement here.

Why this answer

Zone redundancy in Azure SQL Database spreads replicas across availability zones within a region, providing automatic failover if a zone becomes unavailable. It requires no application changes because the same server hostname is used. Auto-failover groups and active geo-replication are cross-region features, and read-scale out is for read offloading, so none of those meet the intra-region zone failure requirement.

Exam trap

The trap here is confusing intra-region zone redundancy with cross-region features such as auto-failover groups or active geo-replication.

17
Multi-Selecthard

Which THREE actions can be performed by using Elastic Database Jobs in Azure SQL Database? (Choose three.)

Select 3 answers
A.Run a T-SQL script to update statistics across multiple databases.
B.Collect metadata about databases and store it in a table.
C.Create a new Azure SQL Database.
D.Change the service tier objective (SLO) of a database.
E.Rebuild indexes on all databases in an elastic pool.
AnswersA, B, E

Elastic Database Jobs run T-SQL against a target group of databases, so a statistics-update script can execute across many Azure SQL databases from one job definition. This satisfies the stem's requirement for cross-database administrative scripting.

Why this answer

Elastic Database Jobs in Azure SQL Database are designed to run T-SQL scripts against a target group of databases, so option A is correct: a job can execute a T-SQL script that runs UPDATE STATISTICS across multiple databases in the target group. Option B is correct because jobs can run T-SQL that queries catalog views such as sys.databases and sys.dm_db_resource_stats and inserts the results into a table for centralized metadata collection. Option E is correct because index maintenance, including ALTER INDEX ...

REBUILD, is a T-SQL operation that can be executed by a job against every database in an elastic pool used as the job target. Option C is not correct because creating a new Azure SQL Database is a control-plane operation performed through the Azure portal, PowerShell, CLI, or REST API, not through the T-SQL execution model of Elastic Database Jobs. Option D is not correct because changing the service tier objective (SLO) is also a management/control-plane action, not a T-SQL statement that Elastic Database Jobs can run against target databases.

Exam trap

The trap here is that candidates may assume Elastic Database Jobs can perform any administrative task, but they are strictly limited to executing T-SQL scripts and cannot perform resource-level operations like creating databases or changing service tiers.

18
MCQmedium

You are responsible for an Azure SQL Managed Instance that hosts a database with a table named Orders. The table has a clustered index on OrderID and a nonclustered index on CustomerID. You notice that a frequently executed query that filters on CustomerID and returns a small number of rows is performing a clustered index scan. You need to improve the query performance. What should you do?

A.Update statistics on the CustomerID column.
B.Create a covering nonclustered index on CustomerID that includes the columns required by the query.
C.Force the query to use the existing nonclustered index with a query hint.
D.Rebuild the nonclustered index on CustomerID.
AnswerB

The query filters on CustomerID and returns a small number of rows, but the optimizer chooses a clustered index scan, likely because the nonclustered index on CustomerID does not cover the query and key lookups would be expensive. A covering index includes all columns referenced by the query (in the key or INCLUDE clause), eliminating key lookups and enabling an index seek. This reduces IO and CPU, improving performance for this frequent query.

Why this answer

When a query filters on a nonclustered index key but requires additional columns not in the index, the optimizer may choose a clustered index scan to avoid key lookups. Making the nonclustered index covering by including the required columns allows an index seek that returns all needed data without touching the base table. This is the most direct and reliable way to improve performance for this frequent query.

Exam trap

The trap here is assuming that rebuilding or updating statistics will change the plan, when the real issue is that the nonclustered index does not cover the query, causing the optimizer to prefer a scan.

19
MCQmedium

You are a database administrator for a healthcare company that uses Azure SQL Database for its electronic health records (EHR) system. The database is in the West Europe region using the General Purpose service tier. The company is expanding to the United States and wants to set up disaster recovery with the secondary in East US. The requirements are: RPO of 5 minutes and RTO of 1 hour. The application should automatically failover without manual intervention. Additionally, you must ensure that the secondary database is not used for read traffic to avoid any performance impact on the primary. What should you configure?

A.Configure active geo-replication to a secondary database in East US and set up a custom monitoring script to trigger failover.
B.Create a failover group with a readable secondary in East US and enable auto-failover.
C.Create a failover group with a non-readable secondary in East US and enable auto-failover.
D.Deploy a zone-redundant General Purpose database in West Europe and use geo-restore to East US.
AnswerC

A failover group with a non-readable secondary in East US satisfies every constraint: geo-replication delivers an RPO well under 5 minutes, automatic failover meets the 1-hour RTO without manual intervention, and setting the secondary to non-readable prevents any read traffic from reaching it, protecting primary performance.

Why this answer

A failover group with auto-failover and a non-readable secondary meets all requirements: RPO of 5 minutes can be achieved with async replication, RTO of 1 hour with automatic failover, and no read traffic. Option A is wrong because active geo-replication alone does not provide automatic failover. Option B is wrong because a readable secondary would be used for read traffic.

Option D is wrong because zone-redundancy doesn't protect regionally.

20
MCQhard

You are troubleshooting a performance issue on Azure SQL Database. The database uses the General Purpose tier with 100 DTUs. Users report intermittent slowdowns during peak hours. Query Store shows frequent waits for RESOURCE_SEMAPHORE. What is the most likely cause?

A.There is a blocking chain due to unoptimized queries.
B.The disk IOPS limit is being reached, causing queuing.
C.The DTU limit is being reached, causing CPU throttling.
D.The database is experiencing memory pressure due to concurrent queries exceeding available memory.
AnswerD

RESOURCE_SEMAPHORE waits occur when queries cannot obtain a memory grant because concurrent queries have consumed the available workspace memory. At 100 DTUs the General Purpose tier caps memory, so peak-hour concurrency triggers the intermittent slowdowns.

Why this answer

RESOURCE_SEMAPHORE waits indicate that queries are waiting for memory grants to execute. In Azure SQL Database General Purpose tier with 100 DTUs, memory is shared between the buffer pool and query execution. During peak hours, concurrent queries can exhaust the available memory, forcing queries to wait for memory grants.

This is a classic sign of memory pressure, not CPU or IO throttling.

Exam trap

The trap here is that candidates often confuse DTU throttling (which affects CPU and IO) with memory pressure, but RESOURCE_SEMAPHORE is a memory-specific wait type that is not directly tied to DTU limits.

How to eliminate wrong answers

Option A is wrong because blocking chains typically manifest as LCK_M_* waits, not RESOURCE_SEMAPHORE waits. Option B is wrong because disk IOPS limits cause PAGEIOLATCH_* waits, not RESOURCE_SEMAPHORE waits. Option C is wrong because DTU limits being reached cause CPU throttling, which appears as SOS_SCHEDULER_YIELD waits, not RESOURCE_SEMAPHORE waits.

21
MCQhard

You are a database administrator for a healthcare company that uses Azure SQL Managed Instance. The company requires that a T-SQL script run every night to perform index maintenance on a specific database. You need to configure an automated solution that uses SQL Server Agent. Which of the following must you do to enable SQL Server Agent jobs on the managed instance?

A.Create a SQL Server Agent job using T-SQL or SQL Server Management Studio.
B.Configure Azure Automation to run the T-SQL script and invoke it from a SQL Server Agent job.
C.Enable the 'Agent XPs' advanced option using sp_configure.
D.Enable the SQL Server Agent service on the managed instance.
AnswerA

On Azure SQL Managed Instance, SQL Server Agent is available and you can create jobs using T-SQL stored procedures in the msdb database or via SQL Server Management Studio. The agent runs automatically, so you simply define the job, steps, and schedule. This is the correct method to automate T-SQL scripts on a schedule.

Why this answer

SQL Server Agent is fully supported on Azure SQL Managed Instance and is always running. You create jobs using T-SQL or SSMS, and the agent executes them on schedule. No additional configuration or external services are needed.

The other options either misstate the agent's availability or suggest unnecessary steps that are not applicable to managed instances.

Exam trap

The trap here is thinking that SQL Server Agent needs to be enabled or that Azure Automation is required, when on Azure SQL Managed Instance it is already available and managed by the platform.

22
MCQhard

You manage an Azure SQL Database that uses a Serverless compute tier. You notice that during idle periods, the database auto-pauses and then auto-resumes when a connection is made. However, users report that the first query after a pause is slow. You need to improve the performance of the first query. What should you do?

A.Increase the maximum vCores
B.Create a SQL Agent job to ping the database every hour
C.Disable auto-pause for the serverless database
D.Enable Query Store
AnswerC

Disabling auto-pause keeps the serverless database continuously active, eliminating the cold-start resume latency that delays the first query. This directly satisfies the requirement to improve first-query performance after idle periods, though it forfeits the cost savings auto-pause provides during inactivity.

Why this answer

The slow first query after auto-resume is caused by the cold-start latency of the serverless compute tier, which includes provisioning resources and warming the buffer pool. Disabling auto-pause ensures the database remains online and the buffer pool stays populated, eliminating the cold-start delay for the first query.

Exam trap

The trap here is that candidates may think increasing vCores or using a ping job solves the cold-start problem, but these options either do not address the root cause or are inefficient workarounds, while disabling auto-pause directly eliminates the latency by keeping the database always active.

How to eliminate wrong answers

Option A is wrong because increasing the maximum vCores does not prevent auto-pause or reduce cold-start latency; it only scales compute resources during active periods. Option B is wrong because a SQL Agent job that pings the database every hour would keep the database from auto-pausing only if the ping interval is shorter than the auto-pause delay (default 1 hour), but this is a workaround that does not address the root cause and can incur unnecessary compute costs. Option D is wrong because enabling Query Store captures query performance data but does not affect the auto-pause behavior or the cold-start latency of the first query after resume.

23
MCQeasy

You need to automate the deployment of an Azure SQL Database and its schema to multiple environments (dev, test, prod) using a repeatable process. The solution must support version control and CI/CD integration. What should you use?

A.Azure Automation runbooks that execute sqlcmd scripts
B.Azure DevOps Pipelines with a DACPAC deployment task
C.Azure Data Factory with a copy activity
D.Azure Logic Apps with a SQL Server connector
AnswerB

Azure DevOps Pipelines can integrate with source control to automatically build and deploy a DACPAC (Data-tier Application Package) to Azure SQL Database. The DACPAC contains the schema and can be deployed using SqlPackage.exe. This supports version control, continuous integration, and continuous deployment, making it ideal for repeatable multi-environment deployments. It aligns with DevOps practices and automates the entire process.

Why this answer

Azure DevOps Pipelines with a DACPAC deployment task provide a robust CI/CD solution for deploying Azure SQL Database schemas. The DACPAC encapsulates the schema, and pipelines integrate with Git for version control. This enables automated, repeatable deployments across multiple environments with minimal manual intervention, aligning with DevOps best practices.

Exam trap

The trap here is assuming that any automation tool can handle schema deployment, but only DACPAC-based pipelines provide built-in version control and CI/CD integration.

24
MCQmedium

You are managing an Azure SQL Database that experiences intermittent performance degradation. Query Store shows a significant increase in wait time for PAGEIOLATCH_SH. You need to identify the most likely cause. What should you investigate first?

A.Out-of-date statistics
B.Insufficient IOPS or throughput at the database level
C.Missing indexes
D.Blocking from long-running transactions
AnswerB

PAGEIOLATCH_SH waits occur when sessions stall reading pages from storage into the buffer pool, so the first suspect is storage throughput. Checking database-level IOPS or throughput limits identifies whether the tier is throttling reads during the degradation windows.

Why this answer

PAGEIOLATCH_SH waits indicate I/O subsystem pressure, often due to insufficient IOPS or throughput. Option A is incorrect because out-of-date statistics cause cardinality estimation errors, not I/O waits. Option C is incorrect because missing indexes typically cause table scans but not necessarily PAGEIOLATCH waits.

Option D is incorrect because blocking causes waits like LCK_M_*, not PAGEIOLATCH.

25
Multi-Selecthard

Which THREE actions are required to configure Microsoft Entra ID authentication for an Azure SQL Database? (Choose three.)

Select 3 answers
A.Configure a firewall rule to allow connections from the Microsoft Entra ID service.
B.Set a Microsoft Entra ID administrator for the Azure SQL Database server.
C.Create contained database users in the database mapped to Microsoft Entra identities.
D.Ensure that the Microsoft Entra identity used to connect is a member of the same Azure AD tenant as the server.
E.Ensure that SQL authentication is enabled as a fallback.
AnswersB, C, D

Microsoft Entra ID authentication requires a Microsoft Entra administrator assigned at the server level, since that identity governs directory-based logins for every database on the server. Without this administrator, contained database users cannot be created or authenticated.

Why this answer

Option B is correct because every Azure SQL logical server must have a Microsoft Entra ID administrator provisioned (via the server's Microsoft Entra ID admin setting) before Entra authentication can be used; this admin acts as the security principal authorized to manage Entra logins and users on the server. Option C is correct because, after the Entra admin is set, you must create contained database users (for example, CREATE USER [name] FROM EXTERNAL PROVIDER) in each target database and grant them permissions, since Entra principals are not automatically mapped to database-level access. Option D is correct because the Entra identity used to authenticate must belong to the same tenant as the Azure SQL server (or be a supported guest/B2B identity), as cross-tenant authentication is not supported for Azure SQL Database.

Option A is incorrect because no special firewall rule for the 'Microsoft Entra ID service' is required; Entra authentication uses the existing SQL firewall rules for client connectivity, not a service-specific rule. Option E is incorrect because SQL authentication does not need to be enabled as a fallback — Entra-only authentication is fully supported and SQL auth can even be disabled.

Exam trap

The trap here is that candidates often confuse network-level firewall rules with authentication configuration, incorrectly assuming that a special firewall rule is needed for Entra ID traffic, when in fact only IP-based rules are required for network access.

26
MCQeasy

You are a database administrator for a company that uses Azure SQL Database. You need to configure a diagnostic setting to send database metrics to a Log Analytics workspace for long-term analysis. The solution should be cost-effective and include metrics like CPU percentage, data IO, and log IO. What should you do?

A.Enable Azure SQL Insights (preview) for the database.
B.Enable Query Store and configure it to export to Log Analytics.
C.In the Azure portal, add a diagnostic setting for the database to stream 'AllMetrics' to a Log Analytics workspace.
D.Create a T-SQL job that periodically inserts sys.dm_db_resource_stats into a table in Log Analytics.
AnswerC

Streaming 'AllMetrics' captures the platform metrics Azure SQL Database emits natively — CPU percentage, data IO and log IO — without enabling expensive SQL Insights or query store overhead. Diagnostic settings route these directly to the Log Analytics workspace, satisfying the long-term analysis and cost-effectiveness constraints. Basic and Instance metrics tiers are excluded, keeping ingestion charges minimal.

Why this answer

Azure SQL Database diagnostic settings allow streaming platform metrics (CPU percentage, data IO, log IO) directly to a Log Analytics workspace by selecting the 'AllMetrics' category. This is the native, cost-effective mechanism for long-term metric retention and analysis without custom code. It requires no T-SQL jobs or preview features and integrates directly with Azure Monitor.

Exam trap

The trap is confusing in-database monitoring tools (Query Store, DMVs) with Azure Monitor diagnostic settings — candidates pick Query Store or custom T-SQL jobs because they sound like 'database monitoring', missing that platform metrics require diagnostic settings.

How to eliminate wrong answers

Option A is wrong because Azure SQL Insights is a preview monitoring solution built on top of diagnostic settings and Workbooks; it is not the direct configuration mechanism and adds preview-feature risk and potential cost. Option B is wrong because Query Store captures query-level performance data inside the database engine, not platform metrics like CPU percentage or IO, and it cannot export to Log Analytics natively. Option D is wrong because a custom T-SQL job polling sys.dm_db_resource_stats is manual, adds operational overhead, and does not provide the native metric streaming that diagnostic settings offer.

27
Multi-Selecthard

Which THREE actions can you take to optimize query performance in Azure SQL Database using Intelligent Query Processing?

Select 3 answers
A.Enable adaptive joins
B.Enable interleaved execution for MSTVFs
C.Enable Query Store
D.Enable columnstore indexes
E.Use approximate count distinct
AnswersA, B, E

Adaptive joins let the optimiser defer the hash-versus-nested-loops decision until after the first input is scanned, choosing based on actual row counts. This corrects poor join choices caused by inaccurate cardinality estimates at compile time.

Why this answer

Adaptive joins (A) are an Intelligent Query Processing feature that lets the optimizer defer the choice between a hash join and a nested loops join until runtime, switching to the better plan based on actual row counts and thereby improving performance for queries with inaccurate cardinality estimates. Interleaved execution for MSTVFs (B) is also an IQP feature that lets multi-statement table-valued functions be executed in an interleaved manner so the optimizer can use actual row counts from the function's first execution to produce a better overall plan. Approximate count distinct (E) is an IQP capability (APPROX_COUNT_DISTINCT) that returns statistically accurate distinct counts with much less CPU and memory than exact COUNT(DISTINCT), speeding up aggregation-heavy queries.

Query Store (C) is a monitoring and plan-capture feature, not an IQP query-optimization action, and columnstore indexes (D) are a physical data-access/columnar storage technology rather than an Intelligent Query Processing optimization, so neither belongs among the three IQP actions.

Exam trap

DP-300 often tests candidates who conflate all performance features (Query Store, columnstore, IQP) into one bucket — the key is recognizing that IQP is specifically about runtime plan adaptation, not storage or monitoring.

28
MCQeasy

You are analyzing query performance in an Azure SQL Database. The query in the exhibit returns a list of queries ordered by total_logical_reads. What does high total_logical_reads typically indicate?

A.The query is experiencing I/O latency
B.The query is using a lot of CPU time
C.The query is using a lot of memory
D.The query is reading many pages from the buffer pool, possibly due to missing indexes
AnswerD

High total_logical_reads means the query is pulling many 8 KB pages from the buffer pool, indicating it scans more data than necessary. This points to missing or ineffective indexes forcing large scans, satisfying the stem's constraint of diagnosing poor query performance.

Why this answer

High total_logical_reads typically indicates that the query is reading many pages from the buffer pool, which often points to missing or inefficient indexes. Option D is correct. Option A is incorrect because high logical reads relate to buffer pool access, not necessarily I/O latency (which is indicated by high physical reads).

Option B is incorrect because CPU time is measured by worker_time, not logical reads. Option C is incorrect because while logical reads can increase memory usage, the primary indicator of memory usage is the memory grant, not logical reads.

29
MCQhard

You are designing an automated backup strategy for Azure SQL Managed Instance. The solution must ensure point-in-time restore (PITR) within 2 hours for the last 7 days and long-term retention (LTR) for 5 years. Which configuration should you use?

A.Use Azure Backup for SQL Server in Azure VM to back up the managed instance.
B.Set PITR retention to 7 days and use geo-redundant backup storage for LTR.
C.Set PITR retention to 2 hours and configure a custom backup job using Elastic Database Jobs.
D.Set PITR retention to 7 days (default) and configure LTR backup policy with yearly backups for 5 years.
AnswerD

PITR retention governs the point-in-time restore window, so 7 days meets the 2-hour PITR requirement for the last week. LTR policies separately retain yearly backups for 5 years, satisfying the stem's long-term retention constraint without extending PITR.

Why this answer

Azure SQL Managed Instance supports point-in-time restore (PITR) with a configurable retention period from 1 to 35 days; the default is 7 days, which satisfies the requirement to restore within 2 hours for the last 7 days (the 2-hour target is a recovery point objective, not retention). For long-term retention (LTR) of 5 years, Managed Instance supports LTR backup policies with yearly backups that can retain backups for up to 10 years. Therefore, setting PITR retention to 7 days (default) and configuring an LTR policy with yearly backups for 5 years meets both requirements.

Option A is wrong because Azure Backup for SQL Server in Azure VM is for SQL Server on Azure VMs, not for Managed Instance. Option B is wrong because "geo-redundant backup storage for LTR" is a storage redundancy option, not an LTR retention policy; LTR requires explicit backup frequency and retention configuration. Option C is wrong because PITR retention cannot be set to 2 hours (minimum is 1 day) and custom backup jobs using Elastic Database Jobs are unnecessary; Managed Instance automates backups natively.

30
MCQmedium

You are configuring Azure SQL Database for a multi-tenant application. Each tenant's data is stored in a separate database. You need to ensure that a tenant admin can only manage their own database and not other databases on the same logical server. What is the best approach?

A.Use a server-level firewall rule to restrict access to the tenant's IP.
B.Create a contained database user with db_owner role in each tenant's database and use Microsoft Entra authentication.
C.Create a server-level login and assign it as db_owner on all databases.
D.Create a database-level firewall rule for each tenant database.
AnswerB

Contained database users live inside each database, so a tenant admin granted db_owner there cannot reach other databases on the same logical server. Microsoft Entra authentication supplies the identity, and no server-level login is created, preserving tenant isolation.

Why this answer

Creating a contained database user with the db_owner role in each tenant's database, using Microsoft Entra authentication, ensures that the tenant admin can only manage their own database. Contained database users are scoped to the individual database, not the logical server, so they cannot access other databases on the same server. This aligns with the principle of least privilege for multi-tenant isolation.

Exam trap

The trap here is that candidates often confuse server-level logins with database-level contained users, assuming that assigning db_owner via a server login is sufficient for isolation, but it actually grants cross-database access.

How to eliminate wrong answers

Option A is wrong because a server-level firewall rule restricts access based on IP address, not database-level permissions; it would allow or block network access to the entire server, not isolate tenant admins to their own database. Option C is wrong because creating a server-level login and assigning it as db_owner on all databases would grant the tenant admin full control over every database on the server, violating multi-tenant isolation. Option D is wrong because a database-level firewall rule controls network access at the database level but does not manage authentication or authorization; it cannot prevent a user from connecting to other databases if they have server-level credentials.

31
MCQmedium

You need to configure alerts for an Azure SQL Database to notify the operations team when the database exceeds 80% DTU consumption for more than 10 minutes. What should you use?

A.Configure a SQL Agent alert
B.Configure Azure SQL Auditing
C.Use Azure Advisor recommendations
D.Create a metric alert in Azure Monitor
AnswerD

Azure Monitor metric alerts evaluate platform metrics such as DTU consumption against thresholds over a defined window, satisfying the 80% for 10 minutes condition. DTU percentage is emitted automatically as a metric, so no diagnostic logging or query is needed, unlike Log Analytics-based alerts.

Why this answer

Azure Monitor metric alerts evaluate platform metrics such as DTU percentage over a defined time window and fire notifications via action groups. To alert when DTU consumption exceeds 80% for more than 10 minutes, you create a metric alert on the 'DTU percentage' metric with a threshold of 80 and an aggregation granularity/window of 10 minutes. This is the native, supported mechanism for Azure SQL Database resource alerts.

Exam trap

DP-300 often tests the confusion between auditing (security logging) and monitoring (performance metrics) — candidates pick 'Azure SQL Auditing' because it sounds like it watches the database.

How to eliminate wrong answers

Option A is wrong because SQL Agent alerts are a SQL Server on-premises/IaaS feature and are not available for Azure SQL Database (PaaS), which has no SQL Agent. Option B is wrong because Azure SQL Auditing records security-relevant events to storage/Log Analytics, not performance threshold alerts. Option C is wrong because Azure Advisor provides best-practice recommendations, not real-time threshold-based notifications.

32
Multi-Selecteasy

You are tasked with automating the backups of multiple Azure SQL Databases to ensure long-term retention. Which ONE Azure service can be used to achieve automated backups with retention beyond the default 7-35 days?

Select 1 answer
A.Azure Site Recovery
B.Azure Blob Storage snapshots
C.Azure Backup for SQL Server in Azure VMs
D.Azure Storage lifecycle management
E.Azure SQL Database long-term retention (LTR) backup policy
AnswersE

Azure SQL Database long-term retention (LTR) backup policy extends automated backups to up to 10 years, satisfying the requirement for retention beyond the default 7–35 days. LTR stores full backups in Azure Blob storage as read-only copies, independent of the standard retention window, with no manual intervention needed.

Why this answer

Only Azure SQL Database long-term retention (LTR) backup policy provides automated long-term backup retention for Azure SQL Database (PaaS), allowing retention beyond the default 7-35 days up to 10 years. Option C (Azure Backup for SQL Server in Azure VMs) is for SQL Server on Azure VMs (IaaS), not for Azure SQL Database, so it does not apply. The other options (A, B, D) do not provide automated backup with long-term retention for Azure SQL Database.

33
Multi-Selectmedium

You are optimizing an Azure SQL Database that runs a reporting workload. The database is in the General Purpose tier. You notice that many queries are performing table scans on large tables. Which TWO actions would most likely improve query performance without increasing costs?

Select 2 answers
A.Update statistics on the tables.
B.Upgrade to Business Critical tier.
C.Increase MAXDOP to 8.
D.Enable automatic tuning.
E.Create nonclustered indexes on columns used in WHERE clauses.
AnswersA, E

Updating statistics gives the query optimiser accurate cardinality estimates, so it can choose index seeks or better join orders instead of scanning large tables. This directly addresses the stem's table-scan symptom while remaining within the existing General Purpose tier, satisfying the no-added-cost constraint.

Why this answer

Option A is correct because stale or missing statistics prevent the query optimizer from accurately estimating cardinality, often forcing scans instead of seeks; running UPDATE STATISTICS (or relying on auto-update statistics) gives the optimizer better row-count estimates and can produce more efficient plans at no extra cost. Option E is correct because creating nonclustered indexes on the columns referenced in WHERE clauses gives the optimizer a covering or seekable access path, converting full table scans on large tables into index seeks or scans of a much smaller structure, which directly improves reporting query performance without changing the service tier. Option B is not appropriate because upgrading to Business Critical increases cost, violating the 'without increasing costs' constraint.

Option C is not appropriate because raising MAXDOP to 8 changes parallelism for the whole workload and does not address the root cause of scans, and it can even hurt performance or increase resource usage. Option D is not appropriate because enabling automatic tuning may create or drop indexes and force plans, but it is not a guaranteed, immediate fix for the observed scans and does not by itself ensure the specific WHERE-clause columns are indexed.

Exam trap

DP-300 often tests the trade-off between performance and cost, tempting candidates to choose tier upgrades or MAXDOP changes when cost-neutral options like indexing and statistics are correct.

34
MCQhard

Your Azure SQL Database is accessed by three separate applications. You must ensure that each application can connect only from its own set of IP addresses, that the addresses are managed centrally without editing each database, and that no application can reach the database over the public internet from any other address. What should you implement?

A.Enable the Allow Azure services and resources to access this server rule and rely on database permissions per application
B.Create a database-level firewall rule in each database for the corresponding application's addresses
C.Configure a virtual network service endpoint and a network security group that permits the three application subnets
D.Create server-level firewall rules, one per application, containing that application's IP ranges
AnswerD

Server-level firewall rules apply to the logical server and therefore to every database it hosts, so the addresses are managed in one place rather than per database. Defining a separate rule per application restricts each to its own ranges. Because the firewall denies traffic that does not match a rule, other addresses cannot reach the database.

Why this answer

Server-level firewall rules are evaluated for the logical server and apply to all its databases, so they centralize address management while letting you define a distinct rule per application. Database-level rules scatter the configuration, the Azure services toggle admits too much, and service endpoints constrain to virtual network subnets rather than per-application address ranges.

Exam trap

The trap here is confusing which firewall scope applies where, leading to database-level rules when the requirement is centralized management across all databases on the server.

35
MCQeasy

You have an Azure SQL Database named InventoryDB in the North Europe region. The database is in the General Purpose service tier. The business requires that InventoryDB remains available if a single availability zone within the North Europe region fails. You need to configure the database to meet this requirement with minimal downtime. What should you do?

A.Change the service tier to Business Critical.
B.Configure active geo-replication with a secondary database in the same region.
C.Configure an auto-failover group with a secondary server in West Europe.
D.Enable zone redundancy for InventoryDB.
AnswerD

Zone redundancy in the General Purpose service tier replicates the database across multiple availability zones within the same region. If one zone fails, the database remains available with automatic failover to another zone. This meets the requirement for high availability within a region with minimal downtime and no application changes.

Why this answer

Zone redundancy is the feature designed to protect against availability zone failures within a region. It replicates databases synchronously across zones, ensuring automatic failover and minimal downtime. Other options either address regional disasters, require manual intervention, or do not provide zone-level protection.

Exam trap

The trap here is confusing zone redundancy with geo-replication or assuming that changing the service tier automatically enables zone redundancy.

36
MCQmedium

You administer an Azure SQL Database named SalesDB that uses the Business Critical service tier. The database is deployed in the West Europe region, which supports availability zones. The application requires that the database remains available even if an entire availability zone fails. You need to configure the database to meet this requirement with minimal administrative effort. What should you do?

A.Configure active geo-replication to a secondary region.
B.Enable zone redundancy on the database.
C.Create a failover group with an auto-failover policy.
D.Deploy the database to a SQL Managed Instance with zone redundancy.
AnswerB

Zone redundancy for Business Critical Azure SQL Database automatically distributes replicas across multiple availability zones, so if one zone fails, the database remains online with no manual intervention. It requires no application changes and is enabled with a single setting, meeting the minimal-effort requirement. This is the correct approach for zone-level high availability.

Why this answer

Zone redundancy in the Business Critical service tier spreads replicas across availability zones, ensuring automatic failover if a zone becomes unavailable. It is a simple configuration toggle that requires no application changes, providing high availability at the zone level. Other options address regional disasters or involve migration, which are not minimal-effort solutions for zone-level resilience.

Exam trap

The trap here is confusing zone-level high availability with regional disaster recovery, leading to selection of geo-replication or failover groups instead of zone redundancy.

37
MCQeasy

You are the database administrator for an Azure SQL Database that contains a column storing national ID numbers. A new regulation requires that this column be hidden from users who run ad hoc queries in the Azure portal Query Editor, while still being available to the payroll application. The payroll application connects with a login that has SELECT permission on the table. What should you implement?

A.Create a view that excludes the national ID column and grant the ad hoc users SELECT on the view only.
B.Apply dynamic data masking to the national ID column and grant UNMASK to the payroll application's user.
C.Enable row-level security on the table with a predicate that filters rows where the national ID is present.
D.Encrypt the national ID column with Always Encrypted and share the column master key with the payroll application.
AnswerB

Dynamic data masking hides the column values from users without the UNMASK permission while leaving the data intact. Granting UNMASK to the payroll user lets that application see real values, and ad hoc users without UNMASK see masked output, satisfying both requirements without altering stored data.

Why this answer

Dynamic data masking is designed to limit exposure of sensitive columns to users without the UNMASK permission while preserving the actual stored values. Granting UNMASK to the payroll application's user allows that workload to read real data, and portal users without UNMASK see masked results, matching the regulation and application needs.

Exam trap

The trap here is reaching for encryption or views when the requirement is permission-based display masking, which dynamic data masking provides without changing the stored data or application code.

38
MCQhard

You are deploying an Azure SQL Database using PowerShell as shown in the exhibit. The database will be used by a development team that works intermittently. You need to ensure the database is cost-effective while being available on demand. What is the purpose of the AutoPauseDelayInMinutes parameter?

A.It configures the database to pause during a disaster recovery scenario.
B.It controls the automatic pausing of the database after a period of inactivity to save costs.
C.It sets the maximum duration for which the database can be paused.
D.It determines how long the database takes to resume after a pause.
AnswerB

AutoPauseDelayInMinutes sets the inactivity period before serverless compute auto-pauses, so the intermittently used development database stops incurring compute charges while remaining available on demand. This directly satisfies the cost-effectiveness requirement without deleting or reprovisioning the database.

Why this answer

The AutoPauseDelayInMinutes parameter is used with Azure SQL Database serverless compute tier. It specifies the number of minutes of inactivity (no CPU usage or active sessions) after which the database automatically pauses, stopping compute billing while storage remains billed. This makes the database cost-effective for intermittent development workloads because it eliminates compute costs during idle periods and automatically resumes on the first connection.

Exam trap

The trap here is that candidates confuse the auto-pause feature with a manual pause/resume operation or with a scheduled shutdown, and they incorrectly assume AutoPauseDelayInMinutes controls resume speed or maximum pause duration, when in fact it only defines the inactivity threshold before automatic pausing occurs.

How to eliminate wrong answers

Option A is wrong because AutoPauseDelayInMinutes does not relate to disaster recovery; disaster recovery is handled by geo-replication, failover groups, or backup/restore, not by pausing. Option C is wrong because the parameter does not set a maximum pause duration; the database remains paused indefinitely until a connection or activity triggers an automatic resume, and there is no configurable maximum pause time. Option D is wrong because the resume time after a pause is not controlled by AutoPauseDelayInMinutes; resume latency is determined by the underlying serverless infrastructure (typically 30-60 seconds) and is not configurable via this parameter.

39
Multi-Selectmedium

You are tuning a query in Azure SQL Database. Which TWO actions can reduce logical reads?

Select 2 answers
A.Add query hints to force index usage
B.Create a nonclustered index on the columns used in WHERE clause
C.Rewrite the query as a stored procedure
D.Increase the database max memory setting
E.Update statistics on the tables involved
AnswersB, E

A nonclustered index stores the WHERE-clause key values in a separate B-tree structure, letting the engine seek directly to matching rows instead of scanning every page. This sharply reduces the pages touched per execution, directly lowering logical reads — the metric the stem asks you to minimise.

Why this answer

Option B is correct because a nonclustered index on the WHERE-clause columns gives the optimizer a narrow access path, so it can seek directly to matching rows instead of scanning the base table or clustered index, which lowers the number of 8 KB pages read and therefore logical reads. Option E is correct because updating statistics gives the optimizer accurate cardinality estimates, enabling better plan choices such as index seeks and appropriate join strategies, which reduces the pages touched per execution. Option A is not correct because forcing an index with a hint does not by itself reduce logical reads and can even increase them if the optimizer's original plan was better.

Option C is not correct because wrapping the query in a stored procedure mainly aids plan reuse and parameterization, not the number of pages read per execution. Option D is not correct because increasing max memory affects buffer pool caching and physical I/O, not the logical read count, which is measured independently of whether pages come from memory or disk.

Exam trap

DP-300 often tests the difference between actions that improve performance generally (query hints, stored procedures, memory) and actions that specifically reduce logical reads (indexes, statistics).

40
Multi-Selecteasy

Which TWO metrics in Azure SQL Database indicate that the database might need to be scaled up?

Select 2 answers
A.Data IO percentage consistently below 20%
B.Session percent consistently below 10%
C.Log write percent consistently above 90%
D.Memory consumption consistently below 30%
E.DTU/CPU consumption consistently above 90%
AnswersC, E

Sustained log write percent above 90% signals the transaction log is saturating its provisioned throughput, a resource-bound bottleneck that scaling up the service tier or compute size directly relieves. This metric isolates log I/O pressure rather than general CPU load.

Why this answer

High DTU/CPU consumption (E) and high log write percent (C) both indicate that the database is approaching or hitting resource limits, suggesting a need to scale up. Options A, B, and D are incorrect because consistently low metrics (data IO, session percent, memory) indicate underutilization, not a need to scale up.

41
MCQmedium

You administer an Azure SQL Database named SalesDB that uses the Business Critical service tier. The database is deployed in the West US 2 region, which does not support availability zones. The application requires a recovery time objective (RTO) of less than 30 seconds for a zonal failure within the region. You need to meet the RTO requirement with minimal administrative effort. What should you do?

A.Enable zone redundancy on the database.
B.Create a read-scale out replica in the same region.
C.Configure an auto-failover group with a secondary in East US 2.
D.Migrate the database to a region that supports availability zones and enable zone redundancy.
AnswerD

To achieve an RTO of less than 30 seconds for a zonal failure, zone redundancy is required. Since West US 2 does not support availability zones, migrating to a supported region and enabling zone redundancy is the only way to meet the requirement with minimal administrative effort. This provides automatic failover within the region.

Why this answer

Zone redundancy in the Business Critical tier provides automatic failover across availability zones with an RTO of less than 30 seconds. Because West US 2 lacks availability zone support, the database must be moved to a region that supports them. Configuring cross-region replication or read replicas does not address zonal failures with the required RTO.

Migrating and enabling zone redundancy is the correct solution.

Exam trap

The trap here is assuming that any Business Critical database can enable zone redundancy regardless of the region's support for availability zones.

42
MCQmedium

You are deploying an Azure SQL Database and need to ensure that the database files are encrypted at rest using a key that you manage in Azure Key Vault. You also need to ensure that the key is automatically rotated. What should you configure?

A.Enable Transparent Data Encryption (TDE) with service-managed keys.
B.Enable Dynamic Data Masking with Azure Key Vault integration.
C.Enable Transparent Data Encryption (TDE) with customer-managed keys in Azure Key Vault.
D.Enable Always Encrypted with column master keys in Azure Key Vault.
AnswerC

TDE with customer-managed keys allows you to use your own key stored in Azure Key Vault. You can configure automatic key rotation by setting up a key rotation policy in Key Vault and enabling the TDE protector to automatically use the latest key version. This meets both encryption and key management requirements.

Why this answer

TDE with customer-managed keys in Azure Key Vault allows you to control the encryption key and manage its lifecycle. You can configure automatic key rotation by setting a rotation policy in Key Vault and enabling the TDE protector to use the latest key version. This satisfies both the encryption at rest and key management requirements.

Exam trap

The trap here is confusing Always Encrypted with TDE; Always Encrypted protects data in use but does not encrypt the entire database at rest.

43
MCQmedium

Your company has an Azure SQL Database that is accessed by multiple applications. You need to implement a security solution that meets the following requirements: - Each application must have its own database user with specific permissions. - All authentication must use Microsoft Entra ID. - You need to be able to rotate credentials for each application without impacting other applications. - The solution must support automatic credential rotation for service principals. What should you do?

A.Use managed identities for each Azure resource and assign permissions to the database.
B.Create a single Microsoft Entra ID service principal for all applications and assign different database roles.
C.Create SQL logins and users for each application with strong passwords, and configure password rotation policies.
D.Create a Microsoft Entra ID service principal for each application, store the client secret in Azure Key Vault, and create a contained database user mapped to each service principal.
AnswerD

Contained database users mapped to Microsoft Entra ID service principals let each application authenticate independently, with no shared server-level login. Storing each client secret in Azure Key Vault enables per-application rotation without affecting others, and Key Vault's rotation policies satisfy the automatic credential rotation requirement.

Why this answer

Creating a separate Microsoft Entra ID service principal per application, storing each client secret in Key Vault, and mapping each to a contained database user gives per-application identity, Entra-only authentication, independent credential rotation, and Key Vault's automatic rotation support. Contained users live in the database, so no server-level login is needed and permissions are scoped per app.

Exam trap

The trap is choosing managed identities for applications (they only work for Azure-hosted resources) or a shared service principal (which breaks per-app rotation isolation).

How to eliminate wrong answers

Option A is wrong because managed identities are tied to Azure resources, not arbitrary applications, and they do not provide the per-application credential rotation described. Option B is wrong because a single shared service principal means rotating its secret affects every application, violating the isolation requirement. Option C is wrong because SQL logins with passwords do not use Microsoft Entra ID authentication, which is a hard requirement.

44
MCQhard

Refer to the exhibit. You have configured the automatic tuning policy as shown. After a week, you notice that an index has been dropped automatically, causing a critical query to run slowly. What should you do to prevent this in the future while still benefiting from automatic tuning?

A.Manually create the dropped index and mark it as a required index.
B.Enable Query Store to track index usage.
C.Set the dropIndex option state to Disabled in the tuning policy.
D.Disable automatic tuning entirely.
AnswerC

Disabling dropIndex prevents automatic tuning from dropping indexes while leaving other tuning options active. This satisfies the requirement to stop the specific action causing slow queries while still benefiting from automatic tuning for index creation and plan regression correction.

Why this answer

The dropIndex option in the automatic tuning policy controls whether SQL Server/Azure SQL can automatically drop indexes it deems unused. Setting dropIndex to Disabled preserves the createIndex and forceLastGoodPlan tuning actions while preventing the risky automatic drop that broke the critical query. This is the targeted fix that keeps automatic tuning benefits without the destructive behavior.

Exam trap

DP-300 often tests the misconception that you must disable automatic tuning entirely to stop one unwanted action, when in fact each tuning option (createIndex, dropIndex, forceLastGoodPlan) can be toggled independently.

How to eliminate wrong answers

Option A is wrong because marking an index as required is not a supported mechanism in the automatic tuning policy — there is no 'required index' flag that exempts an index from the dropIndex action. Option B is wrong because Query Store is already the underlying data source that automatic tuning uses; enabling it does not prevent index drops. Option D is wrong because disabling automatic tuning entirely throws away the beneficial createIndex and forceLastGoodPlan features, which is overkill for the stated requirement.

45
Multi-Selecteasy

Which TWO are valid methods to connect to an Azure SQL Database without exposing a public endpoint?

Select 2 answers
A.Use Always Encrypted
B.Use a public endpoint with a firewall rule
C.Use a service endpoint
D.Use a site-to-site VPN gateway and connect to public endpoint
E.Use a private endpoint
AnswersC, E

Service endpoint secures traffic to Azure SQL from your VNet without a public IP.

Why this answer

A service endpoint extends your virtual network private address space and the identity of your VNet to Azure SQL Database over a direct connection on the Azure backbone network. This allows you to secure your logical SQL server to accept traffic only from a specific subnet, eliminating the need for a public endpoint while still using the public endpoint's DNS name internally.

Exam trap

The trap here is that candidates confuse network-level access controls (firewall rules, VPNs) with endpoint exposure, mistakenly thinking that encrypting traffic or routing through a VPN eliminates the public endpoint's existence, when in fact the public DNS name and IP remain reachable from the internet.

46
Multi-Selectmedium

You manage an Azure SQL Database that contains a table with sensitive columns. You need to implement Dynamic Data Masking so that users in the 'Reporting' database role see masked values, while users in the 'DataEntry' role see unmasked values. You have created the masking rules. Which two actions should you perform to meet the requirement? (Choose two.)

Select 2 answers
A.Alter the masking rules to use the 'default()' function for the sensitive columns.
B.Ensure the 'Reporting' role does not have the UNMASK permission.
C.Grant the UNMASK permission to the 'DataEntry' role.
D.Create a separate database user for each member of the 'Reporting' role.
E.Enable auditing on the database to track who views masked data.
AnswersB, C

By default, users without UNMASK see masked data. To ensure the Reporting role sees masked values, you must confirm that the role does not possess UNMASK, either directly or through role membership. If the role or its members had UNMASK, they would see the unmasked data, defeating the purpose. Thus, verifying and, if necessary, revoking UNMASK from the Reporting role is required.

Why this answer

Dynamic Data Masking is enforced through the UNMASK permission. Users without UNMASK see masked data; users with UNMASK see the original values. To allow the DataEntry role to see unmasked data, you grant UNMASK to that role.

To ensure the Reporting role sees masked data, you must verify that the role (and its members) does not have UNMASK. These two actions together satisfy the requirement without altering the masking rules.

Exam trap

The trap here is assuming that masking rules themselves can be targeted to specific roles, when in fact masking is controlled by the UNMASK permission and applies to all users who lack it.

47
MCQmedium

You are deploying an Azure SQL Managed Instance to host several databases migrated from an on-premises SQL Server. The instance must be placed in a dedicated subnet within an Azure virtual network to allow communication with other Azure resources and on-premises systems over a site-to-site VPN. You need to configure the network environment. What should you do?

A.Create a subnet and deploy a private endpoint for the SQL Managed Instance, then configure private DNS zones for name resolution.
B.Create a subnet and assign a public IP address to the SQL Managed Instance, then configure firewall rules to restrict access.
C.Create a subnet and configure a service endpoint for Microsoft.Sql, then attach a route table with a default route to the internet.
D.Create a subnet delegated to Microsoft.Sql/managedInstances and associate a network security group (NSG) that allows traffic on the required ports.
AnswerD

Azure SQL Managed Instance requires a dedicated subnet delegated to Microsoft.Sql/managedInstances. The delegation allows Azure to inject instance resources into the subnet. An NSG is required to control traffic, and specific ports must be open for management and connectivity. This configuration enables communication with other Azure resources and on-premises systems via VPN.

Why this answer

Azure SQL Managed Instance must be deployed into a dedicated subnet delegated to Microsoft.Sql/managedInstances. The subnet requires a network security group to control traffic and may require a route table with specific routes. This setup enables secure communication with other Azure resources and on-premises networks over VPN or ExpressRoute, fulfilling the networking requirements.

Exam trap

The trap here is confusing SQL Managed Instance networking with Azure SQL Database, where service endpoints or private endpoints are used; SQL Managed Instance requires a delegated subnet.

48
MCQhard

You are troubleshooting a failover group for Azure SQL Database. The automatic failover is not triggering as expected during a regional outage. You verify that the grace period for data loss is set to 3600 seconds. The outage lasts 30 minutes. What is the most likely reason the automatic failover did not occur?

A.The failover policy is set to manual.
B.The outage duration is less than the grace period for data loss.
C.The grace period for data loss is too short.
D.The secondary region is also experiencing an outage.
AnswerB

Automatic failover only triggers once the grace period elapses, and 3600 seconds equals 60 minutes. The 30-minute outage falls short of that threshold, so Azure SQL Database withholds failover to avoid potential data loss, satisfying the stem's grace-period constraint.

Why this answer

The grace period for data loss (also called the 'grace period' or 'data loss grace period') is the maximum time the failover group waits before forcing a failover when the primary region is unavailable. If the outage duration is shorter than this grace period, Azure SQL Database will not trigger automatic failover because it still hopes to recover the primary without data loss. Here, the grace period is 3600 seconds (60 minutes) and the outage lasted only 30 minutes, so the condition for automatic failover was not met.

Thus, the most likely reason is that the outage duration is less than the grace period.

Exam trap

DP-300 often tests the misconception that a longer grace period causes faster failover, when in fact a longer grace period delays failover until the specified time has elapsed, potentially exceeding the outage duration and preventing automatic failover.

How to eliminate wrong answers

Option A is wrong because if the failover policy were set to manual, automatic failover would never occur regardless of outage duration, but the question states that automatic failover is not triggering as expected, implying it is configured for automatic. Option C is wrong because a grace period of 3600 seconds is not too short; in fact, it is longer than the outage, which is why failover did not occur. Option D is wrong because if the secondary region were also experiencing an outage, that would be a valid reason, but the scenario does not indicate that; the outage is described as a regional outage affecting the primary, and the grace period is the key factor.

49
MCQmedium

You administer an Azure SQL Database named HRDB. The security team requires that all data written to the database be encrypted with a customer-managed key that is stored in Azure Key Vault, and that the key be automatically rotated every 90 days. You need to configure Transparent Data Encryption (TDE) with Bring Your Own Key (BYOK). What should you do first?

A.Enable Always Encrypted on all columns in HRDB to use the customer-managed key.
B.Export the existing TDE protector from the master database and upload it to Azure Key Vault.
C.Create an Azure Key Vault with purge protection enabled and grant the logical server's managed identity the Key Vault Crypto Service Encryption User role.
D.Create a database-scoped credential that references the Azure Key Vault key and assign it to the database.
AnswerC

TDE with BYOK requires the logical server to access the key. The server's system-assigned managed identity must be granted the Key Vault Crypto Service Encryption User role, and the vault must have purge protection enabled to prevent accidental key deletion. This is the prerequisite before configuring the key as the TDE protector.

Why this answer

To configure TDE with BYOK, you first need an Azure Key Vault with purge protection enabled and the logical server's managed identity granted the appropriate Key Vault Crypto Service Encryption User role. This allows the server to access and use the key as the TDE protector. Without this prerequisite, the key cannot be used for encryption.

Exam trap

The trap here is confusing Always Encrypted with TDE BYOK, or assuming the existing TDE protector can be exported.

50
MCQmedium

You need to audit all schema changes (DDL) on an Azure SQL Database for compliance. The audit logs must be retained for 7 years. What should you do?

A.Enable auditing on the database, log to a storage account, and set the retention policy to 7 years.
B.Create an extended events session to capture DDL events and save to a file.
C.Enable change tracking on the database and query the change tracking tables.
D.Enable SQL Server Audit at the server level and specify a file destination.
AnswerA

Logging to an Azure Storage account supports retention policies of arbitrary length, unlike Log Analytics, which caps retention at two years. Setting the retention policy to 2,555 days (7 years) on the storage account therefore satisfies the compliance requirement while capturing all DDL schema changes through database-level auditing.

Why this answer

Azure SQL Database auditing can be configured at the database level to log all database events, including DDL changes, to a storage account. The retention policy can be set to 7 years directly in the audit settings, ensuring compliance with long-term retention requirements. This is the native, supported method for auditing schema changes on Azure SQL Database.

Exam trap

The trap here is that candidates confuse SQL Server Audit (which supports file destinations on-premises) with Azure SQL Database auditing, which does not support file destinations and requires a storage account, Log Analytics, or Event Hub; they also mistakenly think change tracking or extended events can serve as a compliance audit solution.

How to eliminate wrong answers

Option B is wrong because extended events sessions are primarily for performance monitoring and troubleshooting, not for long-term compliance auditing; they lack built-in retention policies and are not designed for 7-year archival. Option C is wrong because change tracking is designed to track DML changes (INSERT, UPDATE, DELETE) for synchronization scenarios, not DDL schema changes, and it does not provide audit logs with retention. Option D is wrong because SQL Server Audit at the server level with a file destination is not supported on Azure SQL Database; Azure SQL Database only supports database-level auditing, and the file destination is not available—only storage account, Log Analytics, or Event Hub destinations are supported.

51
MCQhard

You are planning the deployment of an Azure SQL Managed Instance to support a lift-and-shift migration of an on-premises SQL Server 2019 workload. The workload requires the ability to run cross-database queries, use SQL Server Agent, and support Service Broker. You need to choose a service tier that provides the highest availability and lowest latency for I/O-intensive operations. The budget allows for premium storage performance. Which service tier should you select?

A.Hyperscale
B.Business Critical
C.General Purpose
D.Premium
AnswerB

The Business Critical service tier in Azure SQL Managed Instance uses locally attached SSD storage and includes a built-in secondary replica for high availability. This provides the lowest I/O latency and highest availability, making it suitable for I/O-intensive workloads. It also supports all the required features such as cross-database queries, SQL Server Agent, and Service Broker.

Why this answer

The Business Critical service tier in Azure SQL Managed Instance is designed for high-performance, low-latency workloads. It uses locally attached SSD storage and maintains a secondary replica for failover, ensuring high availability. It supports all necessary SQL Server features like cross-database queries, SQL Server Agent, and Service Broker, making it the correct choice for this scenario.

Exam trap

The trap here is assuming that Hyperscale is available for Azure SQL Managed Instance, when it is exclusive to Azure SQL Database.

52
Drag & Dropmedium

Drag and drop the steps to configure a SQL Server Agent job in Azure SQL Managed Instance to run a maintenance task in the correct order.

Drag or tap steps into the slots.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Connect to the instance, create a job, define steps, schedule, then enable and start.

53
Multi-Selecteasy

Which TWO tools can be used to automate the deployment of database schema changes to Azure SQL Database as part of a CI/CD pipeline? (Choose two.)

Select 2 answers
A.Azure Data Studio with SQLCMD mode
B.GitHub Actions with the Azure SQL Database deployment action
C.Azure DevOps release pipeline with SQL Server database project (DACPAC) deployment task
D.SQL Server Import and Export Wizard
E.SQL Server Management Studio (SSMS)
AnswersB, C

GitHub Actions orchestrates pipeline jobs, and the Azure SQL Database deployment action connects to the server and applies schema changes via SqlPackage. This satisfies the CI/CD automation constraint by executing DACPAC or SQL script deployment against Azure SQL Database on each pipeline run.

Why this answer

Option B is correct because GitHub Actions provides the 'Azure SQL Database deployment' action (azure/sql-action), which executes scripts or DACPAC/BACPAC deployments against Azure SQL Database as an automated pipeline step. Option C is correct because an Azure DevOps release pipeline can use the 'Azure SQL Database deployment' task (SqlAzureDacpacDeployment) to deploy a SQL Server database project's DACPAC, applying schema changes automatically during CI/CD. Option A is not a pipeline automation tool; Azure Data Studio with SQLCMD mode is an interactive client for running scripts manually.

Option D, the Import and Export Wizard, only moves data between sources and does not manage schema versioning or pipeline deployment. Option E, SSMS, is a manual GUI administration tool and does not itself automate CI/CD schema deployment.

Exam trap

The trap is selecting manual tools like SSMS or Azure Data Studio, which are not automation tools for CI/CD pipelines; candidates must focus on tools that integrate with pipeline systems.

54
MCQhard

You have an Azure SQL Database that uses a failover group for high availability. You need to automate the failover to the secondary region during a planned maintenance window. What is the best approach?

A.Use Azure CLI or PowerShell to invoke planned failover
B.Create an Azure Automation runbook that uses REST API
C.Schedule an Elastic Database Job to execute a failover script
D.Configure Azure Traffic Manager to route traffic to secondary
AnswerA

Planned failover via Azure CLI or PowerShell performs a controlled switchover with zero data loss, letting you schedule it inside the maintenance window. It gracefully drains the primary before promoting the secondary, unlike an unplanned forced failover.

Why this answer

Using Azure CLI or PowerShell to invoke a planned failover is the best approach because it provides a direct, scriptable, and auditable method to trigger failover during a planned maintenance window. Planned failover ensures no data loss by synchronizing all pending changes before switching, and it can be automated via scripts in Azure DevOps or other orchestration tools. This meets the requirement for automation during a planned window with minimal complexity.

Exam trap

The trap is confusing traffic routing (Traffic Manager) or generic job scheduling (Elastic Jobs) with the actual database failover operation; candidates must recognize that planned failover requires a direct database control-plane command, not a DNS or job-based workaround.

How to eliminate wrong answers

Option B is wrong because while an Azure Automation runbook using REST API can invoke failover, it is more complex and indirect than using native CLI/PowerShell cmdlets; it adds unnecessary overhead for a planned failover. Option C is wrong because Elastic Database Jobs are designed for running T-SQL scripts across multiple databases, not for orchestrating geo-failover of a failover group; they lack the necessary permissions and cmdlets for failover operations. Option D is wrong because Azure Traffic Manager is a DNS-based traffic routing service that can redirect clients to the secondary region, but it does not perform the actual database failover; it only routes traffic, leaving the database in a non-failed-over state.

55
MCQmedium

You manage an Azure SQL Database named HRDB. The security team requires that all data in transit between the application and HRDB be encrypted, and that the database reject any connections using TLS versions below 1.2. You need to enforce this requirement with the least administrative effort. What should you do?

A.Set the 'Minimum TLS version' to 1.2 on the Azure SQL logical server.
B.Configure a firewall rule to allow only the application's IP address.
C.Enable Always Encrypted on sensitive columns in HRDB.
D.Enable Transparent Data Encryption (TDE) on HRDB.
AnswerA

Azure SQL Database enforces TLS 1.2 by default, but the logical server setting lets you explicitly require a minimum TLS version. Configuring this at the server level applies to all databases on that server and requires no application changes or client certificate management, satisfying the requirement with minimal effort.

Why this answer

The logical server's minimum TLS version setting enforces the required protocol for all connections to databases on that server. This is a server-level configuration that requires no application code changes and ensures clients using TLS 1.0 or 1.1 are rejected. TDE, firewall rules, and Always Encrypted address different security concerns and do not control the TLS version negotiated.

Exam trap

The trap here is confusing data-at-rest encryption features like TDE or Always Encrypted with transport security controls that govern the TLS version used during connection negotiation.

56
MCQmedium

You are a database administrator for a financial services company that uses Azure SQL Database. The company requires that all administrative tasks, such as index maintenance and statistics updates, be automated and run on a schedule. You need to implement a solution that uses T-SQL scripts and runs them on a schedule without requiring an external server. What should you use?

A.Azure Functions with timer trigger
B.Elastic Database jobs
C.SQL Server Agent
D.Azure Automation runbooks
AnswerB

Elastic Database jobs in Azure SQL Database allow you to run T-SQL scripts against a target group of databases on a schedule. They are a built-in feature of Azure SQL Database and do not require an external server or agent. This makes them ideal for automating administrative tasks like index maintenance and statistics updates across one or many databases.

Why this answer

Elastic Database jobs are a native Azure SQL Database feature that enables scheduling and execution of T-SQL scripts across databases. They require no external compute or agent, simplifying automation of routine administrative tasks. Other options either are not available in Azure SQL Database or require additional infrastructure and code, making them less suitable for this scenario.

Exam trap

The trap here is assuming that SQL Server Agent is available in Azure SQL Database, when it is only supported in SQL Server and Azure SQL Managed Instance.

57
MCQmedium

You have an Azure SQL Managed Instance. You need to automate the execution of a stored procedure every hour to clean up historical data. What is the most appropriate solution?

A.SQL Agent Job
B.Azure Logic Apps with SQL connector
C.Elastic Database Job
D.Azure Automation runbook with T-SQL
AnswerA

SQL Agent Jobs are the native scheduling mechanism in Azure SQL Managed Instance, supporting recurring T-SQL steps such as executing a stored procedure hourly. Unlike Azure Automation or Elastic Jobs, it runs in-instance with no external orchestrator, satisfying the hourly cleanup requirement directly.

Why this answer

SQL Agent Jobs are a built-in feature of Azure SQL Managed Instance, providing native scheduling for T-SQL jobs like executing a stored procedure every hour. Option B is less appropriate because Azure Logic Apps is an external service that adds complexity and latency. Option C is designed for executing tasks across multiple databases, not a single instance.

Option D is external and less integrated compared to the native SQL Agent Job.

58
MCQmedium

You are migrating an on-premises SQL Server 2012 database to Azure SQL Managed Instance. The database is 5 TB and uses Transparent Data Encryption (TDE) with a certificate stored in the local machine store. What is the best approach to migrate while preserving TDE?

A.Use Azure Data Studio to import the certificate directly from the local machine store during migration.
B.Disable TDE on the source database, migrate the backup, then enable TDE on the target.
C.Back up the certificate and private key to a .pfx file, restore the .pfx to the target managed instance, then restore the database backup.
D.Create a master key in the target managed instance and then restore the database; the certificate will be imported automatically.
AnswerC

Exporting the TDE certificate and private key to a .pfx, restoring it to the managed instance, then restoring the backup preserves encryption because the instance holds the same protector. This satisfies the stem's requirement to migrate while preserving TDE.

Why this answer

TDE in SQL Server relies on a certificate (or asymmetric key) that must be present in the target instance to decrypt the database backup. By backing up the certificate and private key to a .pfx file and restoring it to Azure SQL Managed Instance, you ensure the target has the necessary encryption keys to read the backup. Azure SQL Managed Instance supports restoring TDE-protected backups only if the corresponding certificate is first restored into the master database.

Exam trap

The trap here is that candidates assume TDE certificates are automatically transferred or that disabling TDE is a safe shortcut, but in reality, the certificate must be explicitly backed up and restored to the target before the database restore can succeed.

How to eliminate wrong answers

Option A is wrong because Azure Data Studio cannot import a certificate directly from the local machine store during migration; TDE certificates must be manually backed up and restored to the target instance. Option B is wrong because disabling TDE on the source database would decrypt all data, which is unnecessary and risks exposing sensitive data during migration; TDE should remain enabled to maintain encryption at rest. Option D is wrong because creating a master key in the target does not automatically import the certificate; the certificate must be explicitly backed up from the source and restored to the target before the database restore.

59
MCQmedium

You manage an Azure SQL Database that runs an online transaction processing (OLTP) workload. The database is in the General Purpose service tier with 4 vCores. During month-end processing, you observe that the database is hitting its maximum allowed log write throughput, causing delays. You need to increase the maximum log write throughput without changing the service tier. What should you do?

A.Scale up to 8 vCores.
B.Increase the max size of the database.
C.Enable the Business Critical service tier.
D.Configure active geo-replication.
AnswerA

In the General Purpose service tier, the maximum log write throughput scales with the number of vCores. Increasing from 4 to 8 vCores doubles the log write throughput limit, directly addressing the bottleneck without changing the service tier. This is the correct action because the scenario specifies that the service tier must remain the same, and scaling vCores is the only way to increase log throughput within General Purpose.

Why this answer

In the General Purpose service tier, log write throughput is directly proportional to the number of vCores. Scaling up vCores is the only way to increase log write throughput while remaining in the same service tier. The other options either change the service tier, affect storage size, or add replication overhead without solving the bottleneck.

Exam trap

The trap here is assuming that increasing database max size or changing service tier will increase log write throughput, when in fact only scaling vCores within the same tier does so.

60
MCQmedium

You manage an Azure SQL Database that runs a reporting workload. Users report that month-end reports are slow. You query sys.dm_db_resource_stats and observe that the average log write percentage is consistently high, but CPU and data IO are low. You need to reduce the impact of log write throughput on the workload. What should you do first?

A.Enable read scale-out and redirect reporting queries to the secondary replica.
B.Change the database to the Hyperscale service tier.
C.Scale up the database to a higher service tier or compute size.
D.Increase the database's max size.
AnswerC

The high log write percentage indicates that the database is approaching the log write throughput limit for its current service tier and compute size. Scaling up increases the log write rate limit, directly addressing the bottleneck. Since CPU and data IO are low, the workload is log-write-bound, so a higher tier or more vCores will provide more log throughput and improve report performance.

Why this answer

The sys.dm_db_resource_stats DMV shows resource usage as a percentage of the limit for the current service tier and compute size. A consistently high log write percentage with low CPU and data IO indicates the workload is constrained by the log write throughput limit. Scaling up to a higher service tier or compute size increases that limit, directly alleviating the bottleneck.

Other actions like increasing max size or read scale-out do not affect log write throughput.

Exam trap

The trap here is assuming that high log write percentage is caused by insufficient storage or CPU, when it actually reflects the log write throughput limit of the service tier and compute size.

61
MCQmedium

Your company uses Azure SQL Database. You need to ensure that all connections to the database use TLS 1.2 or higher. Currently, some client applications are connecting using TLS 1.0. What should you do?

A.Configure the server firewall to block non-TLS traffic.
B.Set the 'Minimum TLS version' property of the logical server to 1.2.
C.Set the 'tls_version' database parameter to 1.2 in the master database.
D.Update the client applications to only use TLS 1.2.
AnswerB

Configuring the logical server's Minimum TLS version to 1.2 rejects any client handshake negotiating TLS 1.0 or 1.1, directly satisfying the requirement that all connections use TLS 1.2 or higher. This server-level setting enforces the constraint across every database on that server.

Why this answer

Setting the 'Minimum TLS version' property of the Azure SQL logical server to 1.2 enforces that all incoming connections must use TLS 1.2 or higher. This server-level setting overrides any client-side configuration, blocking connections that attempt to use TLS 1.0 or 1.1. It is the simplest and most effective way to enforce the minimum TLS version across all client applications without requiring changes to each client.

Exam trap

The trap here is that candidates may think updating client applications (Option D) is sufficient, but the exam tests the understanding that server-side enforcement is required to guarantee compliance across all clients, especially when you cannot control or update every client application.

How to eliminate wrong answers

Option A is wrong because the server firewall controls IP-based access, not TLS protocol version enforcement; blocking non-TLS traffic does not prevent clients from connecting with TLS 1.0. Option C is wrong because Azure SQL Database does not expose a 'tls_version' database parameter in the master database; TLS version is controlled at the logical server level, not through database-scoped configuration. Option D is wrong because while updating client applications to use TLS 1.2 is a valid approach, it is not a server-side enforcement mechanism and does not guarantee that all clients will comply; the question asks what you should do to ensure all connections use TLS 1.2 or higher, which requires server-side enforcement.

62
MCQhard

You are deploying a new Azure SQL Database for an application that will store sensitive financial data. The compliance team requires that the database be configured to automatically detect and alert on anomalous access patterns, and that all queries be logged for auditing. Which services should you enable?

A.Azure Purview and vulnerability assessment
B.Microsoft Sentinel and SQL Auditing
C.Azure Defender for SQL and SQL Auditing
D.SQL Server auditing and vulnerability assessment
AnswerC

Azure Defender for SQL provides threat detection and anomalous access alerts, while SQL Auditing writes query activity to a storage, Log Analytics, or Event Hub target. Together they satisfy both the detection-and-alert and query-logging compliance requirements.

Why this answer

Azure Defender for SQL provides anomaly detection and alerts for suspicious access patterns (e.g., SQL injection, brute force), while SQL Auditing captures all queries and events for compliance logging. Together, they meet the requirements for automatic detection and full query auditing without additional services.

Exam trap

The trap here is that candidates confuse Azure Defender for SQL with vulnerability assessment or Microsoft Sentinel, assuming a SIEM is required for detection, when Azure Defender for SQL already provides built-in anomaly detection for Azure SQL Database.

How to eliminate wrong answers

Option A is wrong because Azure Purview is a data governance and catalog service, not a security monitoring tool, and vulnerability assessment alone does not provide real-time anomaly detection or query logging. Option B is wrong because Microsoft Sentinel is a SIEM that ingests logs but does not natively perform database-level anomaly detection or replace SQL Auditing for query logging; it would require additional configuration and cost. Option D is wrong because SQL Server auditing (on-premises style) is not directly available in Azure SQL Database—Azure SQL uses SQL Auditing—and vulnerability assessment does not detect anomalous access patterns or provide alerts.

63
MCQmedium

You are the database administrator for an Azure SQL Database that hosts a multi-tenant SaaS application. Each tenant has its own database user mapped to a Microsoft Entra ID group. The security team requires that every tenant user can see only rows belonging to their own tenant, and that no tenant can infer the existence of other tenants' data through error messages or row counts. You need to implement row-level filtering that enforces this requirement with the least administrative effort. What should you do?

A.Create a view for each tenant that filters rows by tenant ID, and grant tenants access only to their view.
B.Configure a database-scoped credential and use EXECUTE AS USER in every stored procedure that queries tenant data.
C.Create a security policy that uses a predicate function comparing the tenant ID column to the result of DATABASE_PRINCIPAL_ID().
D.Enable Dynamic Data Masking on the tenant ID column so tenants cannot see values belonging to other tenants.
AnswerC

A security policy with a predicate function that filters on the tenant ID column against the current database principal ID enforces row-level security directly in the database engine. Because the filter is applied to every query automatically, tenants cannot see or infer other tenants' rows, and no application changes are required. This matches the least-effort requirement while meeting the strict isolation goal.

Why this answer

Row-level security in Azure SQL Database uses a security policy with an inline table-valued predicate function. When the predicate compares the tenant column to the current database principal, the engine transparently filters rows for every query, including aggregates, preventing cross-tenant visibility without application changes. Views, masking, and impersonation each leave gaps or add maintenance overhead that the scenario rules out.

Exam trap

The trap here is assuming that Dynamic Data Masking or per-tenant views provide row isolation, when masking only hides values and views are easily bypassed or unmanageable at scale.

64
MCQhard

You are the database administrator for an Azure SQL Database that uses Microsoft Entra ID authentication. A new application must connect to the database using a managed identity. The application runs on an Azure virtual machine. You have assigned the managed identity to the VM. What should you do next to allow the application to authenticate to the database?

A.Add the managed identity as a server-level Microsoft Entra ID administrator.
B.Store the managed identity's client secret in Azure Key Vault and configure the application to retrieve it.
C.Create a contained database user in the target database that maps to the managed identity and grant the required permissions.
D.Enable Microsoft Entra ID authentication on the server and set the managed identity as the server admin.
AnswerC

For a managed identity to access Azure SQL Database, you must create a contained database user that represents the identity and then assign permissions. The user is created with the FROM EXTERNAL PROVIDER clause, which maps the identity to a database principal. Without this step, the managed identity can obtain a token but will not have a database user, so authentication will fail at the database level.

Why this answer

When an application uses a managed identity to connect to Azure SQL Database, the identity must be represented as a contained database user in the target database. The user is created with CREATE USER [identity-name] FROM EXTERNAL PROVIDER, and then permissions are granted. This allows the identity to authenticate and access only the objects it needs, following least privilege.

Without this user, the token-based login will not map to a database principal.

Exam trap

The trap here is thinking that assigning a managed identity to a VM is sufficient for database access, when in fact a contained database user must be created inside the database to map the identity to a principal.

65
MCQhard

Refer to the exhibit. You are deploying an Azure SQL Database audit policy using an ARM template. What is the MOST significant security concern with the configuration shown?

A.Enabling Azure Monitor target could allow unauthorized access to logs
B.The storage account access key is exposed in the template
C.Retention of 90 days may be too short for compliance
D.Including successful authentication events may expose sensitive login activity
AnswerB

Embedding the storage account access key in the ARM template exposes a full-privilege credential in plaintext, readable by anyone with access to the template, deployment history or source control. This grants unrestricted access to the audit storage account, undermining the audit trail's integrity.

Why this answer

The ARM template exposes the storage account access key in plaintext as a parameter value. This is a critical security concern because anyone with access to the template (e.g., in source control or deployment logs) can retrieve the key and gain unrestricted access to the storage account, including reading, modifying, or deleting audit logs. Azure SQL Database audit policies should use managed identities or Azure AD authentication to avoid embedding secrets.

Exam trap

The trap here is that candidates may focus on audit event types or retention periods as security concerns, but the real risk is the plaintext storage account key in the template, which is a classic secret exposure vulnerability.

How to eliminate wrong answers

Option A is wrong because enabling Azure Monitor target does not inherently allow unauthorized access; access is controlled by Azure RBAC and the Log Analytics workspace permissions, not by the audit policy configuration itself. Option C is wrong because retention of 90 days is a common compliance requirement (e.g., HIPAA, PCI DSS) and is not inherently a security concern; the question asks for the most significant security concern, not a compliance or operational one. Option D is wrong because including successful authentication events is a standard audit practice for security monitoring and does not expose sensitive login activity in a way that violates security; the concern is about the storage key exposure, not the event types.

66
Multi-Selectmedium

Which TWO configurations can help improve the performance of an Azure SQL Database experiencing high `WRITELOG` waits?

Select 2 answers
A.Enable Transparent Data Encryption (TDE).
B.Use in-memory OLTP to reduce log writes.
C.Increase the service tier to a higher performance level.
D.Enable Query Store.
E.Increase the frequency of database backups.
AnswersB, C

In-memory OLTP stores hot tables and their indexes in memory-optimised structures, so transactional changes are applied without conventional page-latch logging. This directly reduces the volume of log records generated per transaction, lowering WRITELOG waits caused by log-write throughput saturation on the target Azure SQL Database.

Why this answer

Option B is correct because In-Memory OLTP (memory-optimized tables and natively compiled stored procedures) reduces WRITELOG waits by minimizing transaction log traffic: memory-optimized tables use a separate, more efficient checkpoint mechanism, and for SCHEMA_ONLY durability and natively compiled procedures the log writes are drastically reduced, directly lowering log I/O pressure. Option C is correct because WRITELOG waits occur when the transaction log becomes the bottleneck; moving to a higher service tier (e.g., from S3 to S6, or to Premium/Business Critical) increases the provisioned log throughput and IOPS, allowing commits to flush to the log faster and reducing wait time. Option A is not correct because Transparent Data Encryption encrypts data at rest and adds CPU overhead rather than reducing log writes.

Option D is not correct because Query Store captures query execution statistics for performance troubleshooting; it does not reduce WRITELOG waits and can add minor overhead. Option E is not correct because more frequent backups increase log activity and I/O, potentially worsening rather than improving WRITELOG waits.

Exam trap

The trap here is that candidates often confuse WRITELOG waits with general I/O bottlenecks and select backup frequency or TDE, not realizing that only reducing log write volume (via in-memory OLTP) or increasing log write speed (via higher service tier) directly resolves the wait type.

67
MCQeasy

You are a database administrator for an Azure SQL Managed Instance. You need to ensure that all connections to the instance use encrypted connections. What should you configure?

A.Set the 'Force Encryption' option to Yes on the server properties.
B.Enable Transparent Data Encryption (TDE).
C.Enable Always Encrypted for sensitive columns.
D.Configure a firewall rule to allow only specific IP addresses.
AnswerA

This enforces encrypted connections.

Why this answer

Setting 'Force Encryption' to Yes on the Azure SQL Managed Instance server properties enforces the use of TLS (Transport Layer Security) for all client connections. This configuration ensures that any client attempting to connect without encryption will be rejected, thereby meeting the requirement that all connections use encrypted connections. The setting is applied at the instance level and overrides client-side encryption preferences.

Exam trap

The trap here is that candidates often confuse encryption in transit (Force Encryption) with encryption at rest (TDE) or column-level encryption (Always Encrypted), leading them to select a security feature that does not address the specific requirement of encrypting all connections.

How to eliminate wrong answers

Option B is wrong because Transparent Data Encryption (TDE) encrypts data at rest (the database files on disk), not data in transit between the client and the server; it does not enforce encrypted connections. Option C is wrong because Always Encrypted protects sensitive columns by encrypting data at the client side and keeping the encryption keys from the database engine, but it does not enforce encryption for the entire connection or for all data transmitted. Option D is wrong because configuring a firewall rule to allow only specific IP addresses controls network access based on source IP, but it does not enforce encryption on the connections that are allowed through.

68
Multi-Selecthard

Your company is migrating several on-premises SQL Server databases to Azure. The databases range from 50 GB to 2 TB and have varying performance requirements. You need to decide which Azure SQL deployment options to use. The requirements include: - Minimal application changes. - Support for SQL Server Agent jobs. - Ability to scale storage independently from compute. - Native support for cross-database queries. Which TWO options meet these requirements? (Choose two.)

Select 2 answers
A.Azure SQL Database (single database)
B.Azure SQL Database elastic pool
C.Azure Synapse Analytics (dedicated SQL pool)
D.SQL Server on Azure Virtual Machine
E.Azure SQL Managed Instance
AnswersD, E

SQL Server on Azure Virtual Machine provides full SQL Server engine, including native SQL Server Agent, cross-database queries, and independent scaling of compute (via VM size) and storage (via managed disks). Minimal application changes needed. Correct.

Why this answer

SQL Server on Azure Virtual Machine (D) and Azure SQL Managed Instance (E) provide full SQL Server engine compatibility, native SQL Server Agent, cross-database queries, independent storage scaling, and minimal application changes. Azure SQL Database elastic pool (B) does not support SQL Server Agent natively (Azure Elastic Jobs is not SQL Server Agent) and its cross-database query support via elastic query is not as seamless as native; thus it does not meet all requirements. Option A (single database) lacks SQL Server Agent and cross-database queries.

Option C (Azure Synapse) is not designed for OLTP and lacks SQL Server Agent and cross-database query support. Therefore, the two correct options are D and E.

Exam trap

Candidates may see a 'Choose two' instruction and assume there are exactly two correct options, but this question tests knowledge of which Azure SQL options actually satisfy all the given requirements. Only two of the five options meet every requirement, so selecting any third option would be incorrect.

69
MCQeasy

You are a database administrator for a company that uses Azure SQL Database. The company wants to reduce the cost of storing backups. You need to configure the backup storage redundancy to the most cost-effective option while ensuring data durability within a single region. What should you do?

A.Configure zone-redundant backup storage.
B.Configure geo-redundant backup storage.
C.Configure locally redundant backup storage.
D.Configure read-access geo-redundant backup storage.
AnswerC

Locally redundant backup storage replicates backups three times within a single region, providing durability within that region at a lower cost than geo-redundant or zone-redundant options. This meets the requirement for cost-effectiveness and single-region durability. It is the default and most economical choice for backup storage redundancy.

Why this answer

Locally redundant backup storage is the most cost-effective option that provides durability within a single region. It replicates backups three times within the same region, ensuring data redundancy without the added cost of cross-region replication. Geo-redundant and zone-redundant options offer higher durability but at a higher price.

Exam trap

The trap here is assuming that higher redundancy always means better, without considering the cost requirement and the need for only single-region durability.

70
Multi-Selectmedium

Which TWO actions can you perform using Elastic Database Jobs in Azure SQL Database?

Select 2 answers
A.Add a firewall rule to allow access from a specific IP address.
B.Schedule a job to rebuild indexes on a set of databases.
C.Create users in Microsoft Entra ID for database access.
D.Automatically scale the service tier of a database based on CPU usage.
E.Run a T-SQL script to update statistics on all databases in an elastic pool.
AnswersB, E

Elastic Database Jobs run T-SQL on a defined target group, so scheduling index rebuilds across a set of databases is a supported maintenance scenario. This satisfies the stem by automating recurring index maintenance without per-database scripting.

Why this answer

Options B and E are correct. Elastic Database Jobs in Azure SQL Database allow you to schedule and run T-SQL scripts across multiple databases, including those in an elastic pool. You can use them to schedule index rebuilding (B) and to update statistics via T-SQL (E).

Option A is incorrect because firewall rules are managed through Azure SQL Server firewall settings, not Elastic Database Jobs. Option C is incorrect because creating users in Microsoft Entra ID (formerly Azure AD) is done through Active Directory, not Elastic Database Jobs. Option D is incorrect because scaling service tiers is an administrative operation handled by Azure SQL Database scaling commands or automation, not by Elastic Database Jobs.

71
MCQhard

You administer an Azure SQL Database named FinanceDB. Auditors require that all SELECT statements against a table named Ledger be recorded with the identity of the caller, and that the audit records be retained for seven years in immutable storage. You need to configure auditing to meet these requirements. What should you do?

A.Enable auditing with the target set to Log Analytics and set the workspace retention to seven years.
B.Enable auditing with the target set to a storage account configured with an immutability policy and a retention period of seven years.
C.Enable auditing with the target set to Event Hubs and forward events to a consumer application.
D.Enable server auditing with the target set to a storage account and set retention to 0.
AnswerB

Writing audit logs to a storage account that has a time-based immutability policy enforces write-once, read-many retention for the specified period, satisfying the seven-year requirement. Auditing captures the caller identity for SELECT statements against Ledger, and the immutability policy prevents deletion or alteration during the retention window.

Why this answer

Auditing to a storage account with a time-based immutability policy both records caller identity for the monitored statements and enforces immutable retention for the required period. Retention of 0 is not immutable, Log Analytics retention is mutable, and Event Hubs is a transient streaming target. Only the immutability policy on the storage account meets the auditors' requirement.

Exam trap

The trap here is treating a long retention period as equivalent to immutable retention.

72
MCQmedium

You have an Azure SQL Database that uses the Hyperscale service tier. The database is 4 TB and has a readable secondary in a different region. You need to ensure that if the primary region fails, the secondary can be promoted to primary with minimal data loss and without reconfiguring the application connection string. What should you implement?

A.Create a geo-secondary using the Azure CLI and configure the application to use the secondary's server name.
B.Configure active geo-replication and update the application connection string to point to the secondary after failover.
C.Enable zone redundancy on the primary database and rely on automatic failover within the region.
D.Configure an auto-failover group that includes the primary and secondary databases.
AnswerD

Auto-failover groups support Hyperscale service tier databases and provide a read-write listener endpoint that remains constant across failovers. This allows the application to continue using the same connection string after the secondary is promoted. The failover group also manages the replication and supports automatic failover, minimizing data loss and administrative effort. This is the correct solution for the scenario.

Why this answer

Auto-failover groups are the recommended solution for cross-region disaster recovery when you need a stable listener endpoint that does not change after failover. They support Hyperscale tier databases and provide automatic failover with minimal data loss. Active geo-replication requires manual connection string updates, and zone redundancy only provides local high availability.

Therefore, the failover group is the only option that meets all requirements.

Exam trap

The trap here is assuming that active geo-replication provides a stable endpoint; it does not, and the application would need to be reconfigured after failover.

73
MCQmedium

You are deploying a new Azure SQL Database for an internal HR application. The database will store employee records and must be encrypted at rest using a key that your organization rotates every 90 days. The key must be stored in Azure Key Vault and must not be accessible to Microsoft. You need to configure Transparent Data Encryption (TDE) to meet these requirements. What should you do first?

A.Enable TDE with a service-managed key on the Azure SQL logical server.
B.Create a database master key (DMK) in the master database and encrypt it with a password.
C.Create an Azure Key Vault, generate a key, and grant the Azure SQL logical server's managed identity access to the key.
D.Configure a firewall rule to allow the application to connect to the database.
AnswerC

To use customer-managed keys for TDE, you must first create an Azure Key Vault, generate or import a key, and then grant the logical server's managed identity permissions to access that key. This establishes the trust relationship needed before you can configure the database to use the key for encryption. Without this step, the server cannot retrieve the key to encrypt or decrypt the database.

Why this answer

The requirement is to use a customer-managed key stored in Azure Key Vault for TDE, ensuring Microsoft cannot access the key. The first step is to create the Key Vault and key, then grant the Azure SQL logical server's managed identity access to that key. This enables the server to use the key for TDE.

Only after this trust is established can you configure the database to use the key. Other options either use service-managed keys or address unrelated security aspects.

Exam trap

The trap here is assuming that enabling TDE on the server automatically uses a customer-managed key, when in fact you must first set up Key Vault and grant the managed identity access before TDE can use it.

74
Multi-Selectmedium

Your company wants to implement transparent data encryption (TDE) for an Azure SQL Database using a customer-managed key stored in Azure Key Vault. Which TWO prerequisites must be met? (Choose two.)

Select 2 answers
A.The Azure SQL Server must have a system-assigned managed identity.
B.The Key Vault must have an access policy granting necessary permissions to the SQL Server identity.
C.The database must contain a column master key.
D.The Key Vault must be in a different region than the SQL Server.
E.The database must be taken offline during key configuration.
AnswersA, B

A system-assigned managed identity gives the Azure SQL logical server an identity in Microsoft Entra ID, which Key Vault access policies and key wrapping require. Without it, the server cannot authenticate to the vault to unwrap the customer-managed TDE protector.

Why this answer

Option A is correct because Azure SQL TDE with a customer-managed key (BYOK) requires the logical Azure SQL Server to have a managed identity (system-assigned or user-assigned) that can authenticate to Azure Key Vault; the system-assigned managed identity is the standard prerequisite for granting the server access to the key. Option B is correct because the Key Vault must grant that SQL Server identity the required key permissions — typically get, wrapKey, and unwrapKey — via an access policy (or Azure RBAC role assignment) so the server can wrap and unwrap the TDE protector key. Option C is not required: a column master key belongs to Always Encrypted, not TDE, which uses a database encryption key (DEK) protected by a server-level TDE protector.

Option D is incorrect because the Key Vault and SQL Server can be in the same region; there is no requirement that they be in different regions. Option E is incorrect because TDE key configuration does not require taking the database offline; the operation is performed online without database downtime.

Exam trap

The trap here is that candidates often confuse TDE prerequisites with Always Encrypted prerequisites, mistakenly thinking a column master key (Option C) is needed, or they assume the database must be offline (Option E) for key configuration, which is not the case for TDE.

75
MCQmedium

You are configuring a new Azure SQL Database. The application that will use the database requires read-only access to the database from an Azure App Service. You need to ensure that the application connects securely without embedding credentials in code, and that access is limited to the minimum required permissions. What should you do?

A.Enable Microsoft Entra authentication for the Azure SQL Database, create a contained database user mapped to the App Service's managed identity, and grant the user the db_datareader role.
B.Enable Microsoft Entra authentication and create a contained database user mapped to the App Service's managed identity, then grant the user the db_owner role.
C.Create a contained database user with a strong password and store the credentials in Azure Key Vault. Configure the App Service to retrieve the credentials from Key Vault.
D.Enable SQL authentication and create a login with a strong password, then configure the App Service connection string to use this login.
AnswerA

Using Microsoft Entra authentication with a managed identity eliminates the need for credentials in code. The App Service's system-assigned managed identity is used to authenticate to the database. Creating a contained database user for that identity and granting db_datareader role provides read-only access with minimum permissions, meeting all requirements.

Why this answer

Enabling Microsoft Entra authentication and creating a contained database user for the App Service's managed identity eliminates credential management. Assigning the db_datareader role grants read-only access, adhering to the principle of least privilege. This approach is secure, requires no credentials in code, and limits permissions to what the application needs.

Exam trap

The trap here is choosing a solution that uses credentials stored in Key Vault or granting excessive permissions like db_owner; the key is to use managed identity with least privilege.

Page 1 of 8

Page 2

All pages