DP-300 Sample Questions & Answers
Weighting spreads fairly evenly across high availability and disaster recovery planning, automating database tasks, monitoring and optimizing resources, and locking down a secure data-platform environment.
Launch the full DP-300 simulator →Showing 10 of 20 free samples.
- Question 1Advanced
Implement a secure environment · Implement compliance controls for sensitive data
A database contains sensitive employee salary information in a column named 'Salary'. A new data analyst needs to query the employee table for statistical analysis but must not be able to see the actual salary values. The analyst should see a masked value, such as '0.00', for all employees except those in their own department, where they can see the actual salary. Which combination of security features should be implemented to meet this requirement?
Show answer & explanation
Correct answer: D
While DDM and RLS are powerful security features, they don't natively support conditional unmasking based on the data in another column for the same user. DDM applies the mask to all non-privileged users, and RLS filters entire rows. The most direct and flexible way to implement this specific logic (unmask for your own department, mask for others) is to create a security view. The view's logic would contain a CASE statement that checks if the employee's department matches the analyst's department (e.g., using
USER_NAME()or session context) and returns either the actual Salary or a masked value. The analyst is then granted permission only to the view. - Question 2Intermediate
Monitor, configure, and optimize database resources · Monitor and optimize query performance
You are investigating a blocking chain in an Azure SQL Database. You have identified the head blocker session ID as 72. You need to find the specific T-SQL statement that session 72 is currently executing. Which Dynamic Management View (DMV) and function should you query to retrieve this information?
Show answer & explanation
Correct answer: C
The
sys.dm_exec_requestsDMV provides information about each request currently executing in SQL Server, including thesql_handlefor the executing batch. To get the actual text of the SQL statement, you must pass thissql_handleto thesys.dm_exec_sql_textdynamic management function. Joining these two allows you to see the SQL text for a specific session ID.sys.dm_exec_sessionsprovides session-level information but not the currently executing statement text.sys.dm_tran_locksshows lock information but not the query text. - Question 3Beginner
Plan and configure a high availability and disaster recovery (HA/DR) environment · Configure HA/DR for database solutions
True or False: When configuring an Always On availability group for SQL Server on Azure Virtual Machines, a load balancer is required to redirect client connections to the primary replica after a failover.
Show answer & explanation
Correct answer: A
This is true. In an Azure environment, the availability group listener's IP address needs a mechanism to float between the VMs hosting the replicas. An Azure Load Balancer is used for this purpose. It is configured with a health probe to detect which node is the primary replica and directs traffic to that node's IP address accordingly.
- Question 4Intermediate
Configure and manage automation of tasks · Automate deployment of database resources
A database administrator needs to deploy a new Azure SQL Managed Instance using an ARM template. The deployment must be idempotent, meaning running the template multiple times should result in the same state without errors. The administrator must specify the name of the instance in the template. Which ARM template function should be used to ensure the managed instance name is globally unique to avoid deployment failures?
Show answer & explanation
Correct answer: C
The
uniqueString()function is designed for this purpose. It creates a deterministic 13-character hash string based on one or more seed values you provide, such as the resource group ID. Because it's deterministic, if you run the same template with the same seed values again, it will generate the same unique string, which is essential for idempotent deployments. Theguid()function generates a new random GUID on every run, which would cause the deployment to fail on subsequent runs as it would try to create a new resource with a different name. - Question 5Intermediate
Plan and implement data platform resources · Configure resources for scale and performance
An e-commerce company is using Azure SQL Database Hyperscale. During peak sales events, the database experiences significant write activity, leading to transaction log generation rates that approach the 100 MBps limit. The company wants to avoid performance degradation or throttling due to this high log generation. What is the most effective way to scale the database to accommodate this workload?
Show answer & explanation
Correct answer: B
In Azure SQL Database, including the Hyperscale tier, the maximum transaction log generation rate is directly tied to the number of vCores allocated to the compute replica. To increase the log rate limit beyond 100 MBps, the number of vCores must be increased. Adding read replicas helps with read scaling but does not affect the write or log generation capacity of the primary replica. Increasing max database size is irrelevant to the log rate limit. Switching to the DTU model is not an option for Hyperscale.
- Question 6Intermediate
Implement a secure environment · Implement security for data at rest and data in transit
A hospital is deploying a new patient records application on SQL Server 2022. The data contains highly sensitive Personally Identifiable Information (PII) and Protected Health Information (PHI). A critical security requirement is to ensure that even database administrators with
sysadminprivileges cannot view the sensitive data columns in plaintext, while allowing authorized applications to decrypt and process the data. The solution must protect data both at rest and in transit. Which security feature should be implemented?Show answer & explanation
Correct answer: D
Always Encrypted is designed specifically for this use case. It ensures that sensitive data is encrypted on the client-side and remains encrypted at rest, in transit, and even in memory on the SQL Server instance. The decryption keys are never available to the database engine or to a DBA. This separation of duties prevents high-privileged users like DBAs from accessing the plaintext data. TDE encrypts the entire database at rest but does not protect from DBAs who have access to the running instance. DDM only masks data presentation and can be bypassed. SQL Audit tracks access but doesn't prevent it.
- Question 7Intermediate
Configure and manage automation of tasks · Troubleshoot automated database tasks
You are a database administrator for a company that uses an Azure SQL Managed Instance. You have configured database mail to send notifications for job failures. Recently, you have noticed that no email alerts are being sent, although the jobs are failing as expected. You query
sysmail_allitemsand see that the emails have asent_statusof 'failed'. You need to find the detailed error message explaining why the emails are not being sent. Which system view should you query to find this information?Show answer & explanation
Correct answer: B
The
msdb.dbo.sysmail_event_logview contains one row for each message related to the Database Mail system. This includes detailed success or failure messages from the Database Mail external program. When an email fails to send, this is the primary location to look for specific error messages, such as SMTP server connection failures, authentication errors, or other delivery issues. The other views show the status of mail items but not the detailed error logs. - Question 8Advanced
Monitor, configure, and optimize database resources · Configure database solutions for optimal performance
A database consultant is tasked with optimizing a large reporting database hosted on Azure SQL Database. They observe that many queries perform poorly due to inaccurate cardinality estimates, which leads to suboptimal execution plans. The consultant wants to leverage a modern feature that allows the query optimizer to adjust its assumptions based on runtime execution data. Which feature of the Intelligent Query Processing (IQP) family should be enabled to address this specific issue?
Show answer & explanation
Correct answer: C
Cardinality Estimation (CE) feedback is a feature within the Intelligent Query Processing suite that specifically addresses problems arising from inaccurate cardinality estimates. It identifies queries where the estimated number of rows significantly differs from the actual number of rows and then attempts to adjust the model used for subsequent executions, leading to better execution plans. This is achieved by persisting the adjustments as part of a Query Store hint. The other options are also IQP features but address different performance problems.
- Question 9Intermediate
Plan and configure a high availability and disaster recovery (HA/DR) environment · Plan and perform backup and restore of a database
A university maintains a large student information database on an Azure SQL Managed Instance. To satisfy data retention policies, the database must be backed up and retained for at least 7 years. The default backup retention for the service tier is only 35 days. How can the database administrator configure the instance to meet the 7-year retention requirement?
Show answer & explanation
Correct answer: A
Long-Term Retention (LTR) is the Azure SQL feature designed for this purpose. It allows you to configure policies to automatically retain specific full backups in separate Azure Blob storage for up to 10 years. This is the standard, managed way to meet long-term compliance and archival requirements. Manually copying backups is not a managed or automated solution. Geo-replication is for DR, not long-term backup. The base retention period cannot be extended beyond its maximum limit for the service tier.
- Question 10Beginner
Plan and implement data platform resources · Configure resources for scale and performance
A junior DBA is provisioning a new Azure SQL Database for a development team. The team requires a small, low-cost database for functional testing. The workload is expected to be intermittent and unpredictable, with long idle periods. The database must be able to automatically scale compute resources and pause when not in use to minimize costs. Which compute tier is the most appropriate choice for this scenario?
Show answer & explanation
Correct answer: C
The Serverless compute tier is specifically designed for workloads with intermittent, unpredictable usage patterns. It automatically scales compute based on workload demand and can be configured to pause the database during periods of inactivity, where you are only billed for storage. This auto-pausing feature makes it the most cost-effective option for development and test environments with long idle times. The Provisioned tier bills for compute resources continuously, regardless of usage. Hyperscale is designed for very large databases and is not the most cost-effective for this scenario.
Ready for the real thing?
The full DP-300 simulator has every exam-style question, timed mode, and instant scoring.