Microsoft Developing AI-Enabled Database Solutions (DP-800) · 38% practice allocation

Microsoft DP-800: Secure, optimize, and deploy database solutions Practice Questions

5 free sample questions from the Secure, optimize, and deploy database solutions domain, with answers and explanations. The full DP-800 bank has 232 questions across 3 domains. Questions are scenario-based and written from the official Microsoft exam guide.

1.

A developer is publishing a SQL Database Project to a shared Azure SQL Database where other teams' objects already exist. During a recent deployment, the publish operation dropped a table that belonged to another team because it was not present in the project. The developer needs to ensure future deployments only add or modify objects defined in the project and never drop objects that exist in the database but are absent from the project. What should the developer configure in the publish profile?

  • A. Set CreateNewDatabase to False and DeployScriptFileName to a safe output path
  • B. Set DropObjectsNotInSource to False in the .publish.xml profile✓ Correct
  • C. Enable the IgnorePermissions option in the .publish.xml profile
  • D. Set BlockOnPossibleDataLoss to True in the .publish.xml profile
Explanation

The 'DropObjectsNotInSource' publish property controls whether SqlPackage/dacpac deployment drops database objects that exist in the target but are not defined in the source project. Setting it to 'False' prevents the deployment engine from generating DROP statements for objects not in the project, protecting objects owned by other teams.

Why the distractors are wrong:

  • BlockOnPossibleDataLoss halts deployment when schema changes could cause data loss (e.g., column type change, column removal). It prevents destructive column/type changes but does NOT prevent objects outside the project from being dropped.
  • IgnorePermissions instructs the deployment to skip comparing and deploying permission-related changes (GRANT/DENY/REVOKE). It has no effect on whether absent objects are dropped.
  • CreateNewDatabase controls whether the target database is recreated from scratch (dropping everything), not whether individual objects absent from the project are dropped during an incremental publish. Setting it to False alone does not disable DropObjectsNotInSource behavior.
2.

A company's Azure Fabric SQL Database workload is experiencing intermittent deadlocks between two stored procedures. Procedure A updates the Inventory table then the Orders table. Procedure B updates the Orders table then the Inventory table. The DBA wants to identify the deadlock details, including the victim transaction and the resources involved, without enabling a server trace. Which approach should the DBA use?

  • A. Query the sys.dm_os_wait_stats DMV and filter for DEADLOCK wait type
  • B. Query sys.dm_exec_requests and filter by blocking_session_id
  • C. Enable the 'blocked process threshold' configuration and query sys.dm_exec_query_stats
  • D. Read the system health extended event session and inspect deadlock XML graph events✓ Correct
Explanation

The system_health Extended Events session is enabled by default in Azure SQL Database and automatically captures deadlock XML graph events (xml_deadlock_report). The DBA can query the session ring buffer or the event file target to retrieve detailed deadlock information — victim transaction, participating sessions, resources, and wait chains — without configuring any additional trace.

Why the distractors are wrong:

  • sys.dm_exec_requests shows currently executing and blocked requests in real time, but deadlocks are resolved instantly; by the time a DBA queries this DMV, the deadlock victim's session is gone. It is useful for detecting live blocking, not past deadlocks.
  • sys.dm_os_wait_stats aggregates cumulative wait statistics across all sessions and does not record per-incident deadlock details or the objects involved.
  • The 'blocked process threshold' option triggers blocked process reports (for blocking exceeding a time threshold), not deadlock events. sys.dm_exec_query_stats contains aggregated query execution statistics, not deadlock information.
3.

A data engineer is configuring Data API builder (DAB) for a REST endpoint on an Azure SQL Database table named dbo.Products. The team wants the REST endpoint to support cursor-based pagination so that clients can efficiently page through large result sets. Which configuration property in the DAB runtime configuration file controls the maximum number of items returned per page for a REST entity?

  • A. rest.max-response-size-mb
  • B. runtime.pagination.default-page-size
  • C. entities.<name>.rest.max-page-size✓ Correct
  • D. pagination.cursor-enabled
Explanation

In the DAB configuration file (dab-config.json), the per-entity REST pagination limit is set using the 'entities.<entity-name>.rest.max-page-size' property. This defines the maximum number of items the endpoint will return in a single page, and DAB automatically includes a 'nextLink' continuation token when more results exist.

Why the distractors are wrong:

  • 'rest.max-response-size-mb' is not a valid DAB configuration property; DAB does not limit responses by raw byte size via this setting.
  • 'pagination.cursor-enabled' does not exist as a standalone DAB configuration key; cursor behavior is implicit in the pagination model when max-page-size is set.
  • 'runtime.pagination.default-page-size' is a plausible-sounding global setting, but DAB's actual global default is set under 'runtime.pagination' with the key 'default-page-size'; however, the question asks about the property that controls a specific entity's max page size, which is the entity-level setting. The global runtime default does not override the per-entity maximum.
4.

A retail company has an Azure SQL Database table named dbo.Orders. The business requirement states that sales representatives should only be able to read rows where the SalesRepID column matches their own database login. The solution must be transparent to the application — no changes to application queries are permitted. Which feature should you use?

  • A. Column-level DENY permissions on the SalesRepID column
  • B. Row-Level Security with an inline table-valued function as the security predicate✓ Correct
  • C. A view that filters rows by the current user, with application queries rewritten to target the view
  • D. Dynamic Data Masking on the SalesRepID column
Explanation

Row-Level Security (RLS) uses security predicates defined in inline table-valued functions that are bound to a table via a SECURITY POLICY. The filter is applied automatically and transparently at the database engine level on every query against the table, requiring zero application changes.

Why the distractors are wrong:

  • Dynamic Data Masking hides column values but does not restrict which rows are returned; a sales rep could still see all rows, just with some columns masked.
  • Column-level DENY permissions restrict access to specific columns, not specific rows, and would prevent all users from reading SalesRepID entirely, not filter rows per user.
  • Using a view with filtered queries would require the application to change its queries to target the view instead of the base table, violating the 'no application changes' requirement.
5.

An operations team monitors an Azure SQL Database using Azure Monitor. They need to be alerted when the average DTU consumption exceeds 85% for more than 5 minutes, and they want query-level performance details to identify regressions after each application deployment. Which TWO Azure tools or features should they configure?

  • A. Azure SQL Auditing to a Log Analytics workspace, filtered for high-CPU queries
  • B. An Azure Monitor metric alert rule on the 'dtu_consumption_percent' metric with a 5-minute aggregation window and 85% threshold✓ Correct
  • C. Query Store with the 'Query Performance Insight' blade in the Azure portal to review top resource-consuming queries and detect regressions✓ Correct
  • D. An Azure Monitor diagnostic setting that streams all query execution plans to an Event Hub
  • E. A sys.dm_os_wait_stats query scheduled as a SQL Agent job to email the team when CPU wait exceeds a threshold
Explanation

Azure Monitor supports metric alert rules for Azure SQL Database metrics including 'dtu_consumption_percent'. Configuring an alert rule with a 5-minute aggregation window and an 85% threshold directly satisfies the first requirement. Query Store automatically captures runtime statistics for every query and, when combined with Query Performance Insight in the Azure portal, provides a visual timeline of top queries by resource consumption and surfaces performance regressions by comparing query plans before and after deployments.

Why the distractors are wrong:

  • SQL Auditing records security events (logins, schema changes, DML) to enable compliance tracking; it does not capture query CPU usage metrics or facilitate performance regression analysis.
  • sys.dm_os_wait_stats provides server-wide cumulative wait statistics and is not granular enough for per-query analysis. SQL Agent jobs do not exist in Azure SQL Database (only SQL Managed Instance supports SQL Agent).
  • Streaming execution plans to Event Hub via diagnostic settings is not a supported diagnostic log category for Azure SQL Database; execution plans are accessible through Query Store and DMVs, not as a streaming diagnostic log.

Test yourself across every DP-800 domain

The free DP-800 practice test mixes about 20 questions weighted like the exam. The full 232-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

Secure, optimize, and deploy database solutions study guide (DP-800) →

Other DP-800 domains

← All Microsoft Developing AI-Enabled Database Solutions study resources