DP-300 Azure SQL Database Administrator Practice Questions
Prepare for DP-300 with more than an answer.
- Exam fee
- $165 USD
- Level
- Associate
- Valid for
- 1 year
Domains covered on the exam 4
- Plan and implement data platform resources22%
- Monitor, configure, and optimize database resources22%
- Configure and manage automation of tasks17%
- configure a high availability and disaster recovery (HA/DR) environment22%
- 1
A systems administrator is setting up a new SQL Server 2022 instance on an Azure VM. During the setup process, the administrator must decide on the storage configuration for TempDB. The primary goal is to maximize TempDB performance for a workload with heavy use of temporary tables and table variables. According to Microsoft best practices for SQL Server on Azure VMs, where should the TempDB data files be placed?
Show answer details
Correct answer: C
Microsoft's best practice for SQL Server on Azure VMs is to place TempDB files on the local temporary disk (typically the D: drive). This drive is a non-persistent, high-performance SSD that is directly attached to the host node. It offers very low latency and high throughput, which is ideal for the volatile nature of TempDB workloads. Because the data on this drive is lost during events like VM resizing or host migration, it's unsuitable for user database files, but perfect for TempDB, which is recreated every time the SQL Server service starts.
- 2
You are managing an Azure SQL Database that is experiencing performance issues. You suspect that some queries are being recompiled unnecessarily, consuming excessive CPU. You need to verify this by tracking query recompilation events. Which Extended Events event should you monitor to capture this information?
Show answer details
Correct answer: C
The
sql_statement_recompileevent is specifically designed to fire whenever a statement-level recompilation occurs. By creating an Extended Events session that captures this event, you can identify which queries are recompiling and investigate the reason (e.g., statistics changes, schema changes, temp table usage). This is the most direct way to diagnose excessive recompilation issues. The other events are useful for general query monitoring but do not specifically target recompilations. - 3
A DBA is reviewing the security configuration of an Azure SQL Database. The requirement is to implement a mechanism that tracks all
SELECTandDMLactivities performed by members of a specific database role namedAuditors. The tracking information must be written to an Azure Storage account for long-term retention. Which feature should be used to meet this requirement?Show answer details
Correct answer: C
Azure SQL Auditing is the feature designed to track and log database events to an audit log. You can configure it at the server or database level to write to Azure Storage, Log Analytics, or Event Hubs. Importantly, you can create detailed audit specifications that filter events based on criteria such as the action type (
SELECT,UPDATE, etc.) and the database principal (user or role) performing the action. This allows you to precisely target the activities of theAuditorsrole. CDC tracks data changes but notSELECTstatements. Defender for SQL is for threat detection, not general activity auditing. - 4
A development team is using an Azure SQL Database. They report that a specific stored procedure, which was performing well, has started to show significant performance degradation. A DBA uses Query Store and identifies that the query plan for the stored procedure has changed, resulting in a less efficient execution. The DBA finds a previously used plan in Query Store that performs much better. What is the most effective way to resolve the performance issue using Query Store?
Show answer details
Correct answer: B
Query Store's plan forcing capability is the ideal solution for this scenario, known as plan regression. By identifying a historically better-performing plan within Query Store, a DBA can use
sys.sp_query_store_force_plan(or the corresponding UI option in SSMS) to instruct the query optimizer to always use that specific plan for the query. This provides an immediate and stable fix for the performance issue. Clearing the cache is temporary and doesn't guarantee a good plan will be generated next time. Rebuilding indexes might not be related to the plan choice. - 5
A logistics company runs its primary database on a SQL Server Failover Cluster Instance (FCI) hosted on Azure VMs for high availability. A regional power outage affects the Azure datacenter hosting the active node. The failover to the secondary node in a different availability zone is successful, but the business wants to understand the disaster recovery process. The following diagram shows the HA/DR setup. The company's RTO is 1 hour and RPO is 4 hours. Which component in this architecture is primarily responsible for providing the disaster recovery capability to a different Azure region?
graph TD subgraph "Region West US 2" subgraph "Availability Zone 1" VM1["SQL-VM-1 (Active FCI Node)"] end subgraph "Availability Zone 2" VM2["SQL-VM-2 (Passive FCI Node)"] end FCI_LISTENER["FCI Listener"] --> VM1 SHARED_STORAGE[(Azure Shared Disk)] VM1 --> SHARED_STORAGE VM2 --> SHARED_STORAGE AG_LISTENER["AG Listener"] --> VM1 end subgraph "Region East US 2" VM3["SQL-VM-3 (DR Replica)"] end VM1 -- Distributed AG (Async) --> VM3Show answer details
Correct answer: C
The diagram shows a hybrid architecture. The Failover Cluster Instance (FCI) provides high availability within the primary region (West US 2) by failing over between availability zones. However, for disaster recovery to a completely different region (East US 2), a Distributed Availability Group is used. It acts as an 'availability group of availability groups,' allowing the FCI (which acts as a single AG) to replicate data asynchronously to a standalone instance in the DR region. This component provides the cross-region DR capability.
- 6
A financial services company is using an Azure SQL Managed Instance, which is part of a failover group spanning two Azure regions for disaster recovery. During a DR test, a planned failover is initiated. After the failover, applications report intermittent, long-running queries that were previously fast. Analysis shows that the issue is due to parameter-sensitive plans (PSP) that were optimal in the primary region but are inefficient with the data distribution on the now-primary secondary replica. Which action should be taken to resolve this performance issue with minimal service disruption?
Show answer details
Correct answer: D
The correct answer is to use
sp_query_store_clear_message_queues. When a failover occurs in a geo-replication or failover group setup, the Query Store data is replicated to the secondary. However, performance statistics (runtime stats) are not, leading to a potential mismatch. Running this procedure on the secondary just before a planned failover clears any queued-up, in-flight statistics, preventing the carry-over of potentially misleading performance data from the primary. This allows the new primary to generate fresh, relevant statistics post-failover, mitigating issues like PSP optimization problems. Failing back is disruptive. Automatic Tuning might eventually fix it but is not the immediate, targeted solution. Clearing the entire Query Store is a drastic measure that loses all historical performance data. - 7
A manufacturing company uses SQL Server 2022 on an Azure VM for its inventory management system. To comply with internal security policies, the database administrator must ensure that all database users are authenticated exclusively through Microsoft Entra ID and that SQL logins are disabled at the server level. Which TWO actions must be performed to enforce this policy? (Select TWO)
Show answer details
Correct answer: B, C
Setting a Microsoft Entra ID admin is a prerequisite for enabling Microsoft Entra-only authentication.
This is the specific action that disables SQL authentication logins (
saand others) and enforces that all connections must use Microsoft Entra authentication. This feature is available for Azure SQL Database, Managed Instance, and Synapse, and can be configured for SQL Server on Azure VM through specific setup. - 8
You are managing a fleet of Azure SQL Databases for a SaaS application using an elastic pool. You need to automate a script that archives data older than 90 days from a specific table across all databases in the pool. The script needs to run every Sunday at 2:00 AM UTC. Which Azure service should you use to create, schedule, and manage this recurring task with the least amount of operational overhead?
Show answer details
Correct answer: C
Elastic Jobs are specifically designed for running T-SQL scripts across a group of Azure SQL Databases, including all databases in an elastic pool. It provides native capabilities for defining target groups, creating job steps with T-SQL, scheduling, and monitoring execution, making it the most suitable and efficient tool for this scenario. Azure Automation is a more general-purpose automation service and would require more complex scripting to iterate through all databases. SQL Server Agent is not available in Azure SQL Database.
- 9
A database administrator is configuring a high availability solution for a critical SQL Server 2019 instance running on an Azure Virtual Machine. The requirements are to have an RPO of zero for databases within the same Azure region and an RTO of less than 15 minutes. The solution must also provide a readable secondary replica for offloading reporting queries. Which configuration meets all these requirements?
Show answer details
Correct answer: B
An Always On availability group with synchronous-commit mode ensures an RPO of zero by requiring the transaction to be hardened on the secondary before committing on the primary. This configuration also provides automatic failover capabilities for a low RTO and allows the secondary replica to be configured for read-access, meeting the reporting requirement. An FCI provides HA at the instance level but doesn't inherently provide a readable secondary. Asynchronous-commit mode would not guarantee an RPO of zero. Log shipping has a higher RPO and RTO.
- 10
A retail company is migrating its on-premises SQL Server 2014 database to a General Purpose Azure SQL Database. The lead DBA wants to establish a performance baseline before the migration. The on-premises server has Query Store disabled. The goal is to capture key performance metrics like CPU usage, IOPS, and query execution statistics over a representative one-week period. Which tool is most appropriate for collecting this comprehensive performance data from the on-premises server for migration planning?
Show answer details
Correct answer: C
Data Migration Assistant (DMA) is the correct tool for this task. Beyond its primary function of identifying compatibility issues, DMA can run a performance data collection assessment. This assessment gathers detailed information about the source SQL Server's workload, which is then used to recommend an appropriate Azure SQL Database service tier and size. It collects the necessary metrics like CPU, memory, IOPS, and query statistics. DMS is for executing the migration, not for assessment. The SSMS Performance Dashboard is for real-time monitoring, not for long-term data collection for baselining.
