Azure SQL Database Administrator Free Sample Questions

20 free sample questions269 in the full practice test

Try simulator

DP-300 Sample Questions

  1. Question 1

    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?

    Answer and explanation

    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.

  2. Question 2

    Multiple answers

    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)

    Answer and explanation

    Correct answers: 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 (sa and 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.

  3. Question 3

    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?

    Answer and explanation

    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.

  4. Question 4

    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?

    Answer and explanation

    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.

  5. Question 5

    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?

    Answer and explanation

    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.

  6. Question 6

    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?

    Answer and 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.

  7. Question 7

    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?

    Answer and explanation

    Correct answer: C

    The sys.dm_exec_requests DMV provides information about each request currently executing in SQL Server, including the sql_handle for the executing batch. To get the actual text of the SQL statement, you must pass this sql_handle to the sys.dm_exec_sql_text dynamic management function. Joining these two allows you to see the SQL text for a specific session ID. sys.dm_exec_sessions provides session-level information but not the currently executing statement text. sys.dm_tran_locks shows lock information but not the query text.

  8. Question 8

    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.

    Answer and 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.

  9. Question 9

    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?

    Answer and 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. The guid() 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.

  10. Question 10

    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?

    Answer and 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.

Register free to unlock 10 more sample questions

Lifetime One

Own this practice test forever.

$79.99
$75.99
one-time
  • Full access to 269 questions
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • Brainy AI Assistant
  • Lifetime updates

Two

Any 2 exams per month.

$20.00/exam
$39.99
/month
  • 2 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 1,000 Brainy AI Credits
  • Cancel anytime

Premium Twelve

Any 12 exams over 3 months.

$15.00/exam
$179.99
/3 months
  • 4 active exam slots
  • Study, Timed & Flashcard Modes
  • All past and future versions i
  • Detailed Explanations
  • Study Tracking & Past Attempts
  • 15,000 Brainy AI Credits
  • Dedicated support
  • Friend seat included — full access

Trusted by professionals at

NvidiaSupabaseGitHubOpenAITursoClerkClaude AIAmazon