Community Q&A

DP-800 — frequently asked questions

Community-vetted answers to 43 common questions about this exam, each traced back to a specific practice question.

Questions from real practice questions

Each Q&A comes from a specific question — follow the link for the full analysis

How Do You Complete the REGEXP Phone Query for dbo.CustomerMessages?

Why is DigitsOnly written as REGEXP_REPLACE(REGEXP_SUBSTR(...)) instead of REGEXP_REPLACE on MessageRaw?

DigitsOnly must be derived from RawNumber, the extracted phone-number substring. Replacing on MessageRaw would keep unrelated message text and would not preserve the required NULL when no phone pattern matches.

Can REGEXP_LIKE be used for PhoneStatus in this DP-800 drag-drop?

Conceptually REGEXP_LIKE tests whether matching text exists, but the PhoneStatus expression is built as REGEXP_COUNT(MessageRaw, pattern) > 0; choose the drag value that matches that numeric comparison.

SQL Database Blocking and RCSI in Microsoft Fabric

Why does RCSI prevent SELECT from being blocked?

RCSI uses row versioning to provide a consistent snapshot for readers, eliminating the need for shared locks that would conflict with exclusive write locks.

How to identify a sleeping session causing blocking?

Check sys.dm_exec_sessions for open_transaction_count > 0 and status = sleeping, then link via blocking_session_id in sys.dm_exec_requests.

SQL Server REGEXP_REPLACE for Email Normalization

Why does Option A fail to normalize the email?

Option A replaces everything from the '+' to the end of the string with nothing, deleting the domain name entirely.

What does the regex \+.*@ actually match?

It matches the literal plus sign, followed by any characters, stopping right before the '@' symbol.

How Do You Return One Earliest Ticket per Customer per Day from JSON Data?

Why does GROUP BY with MIN(CreatedAt) fail for the dbo.SupportTickets per-customer-per-day report?

It returns the earliest timestamp per group but cannot return the other columns of that specific ticket, so it never satisfies the requirement to return the earliest ticket row itself.

Should the ROW_NUMBER window use JSON_VALUE(Payload,'$.customerId') and CAST(CreatedAt AS date) in the PARTITION BY?

Yes. Partitioning by the extracted customer ID and the date, then ordering by CreatedAt ascending, makes row number 1 the earliest ticket for that customer on that day.

How Should You Partition Table1 by Year in Azure SQL?

Should I use RANGE RIGHT with only '2021-01-01' or also add '2020-01-01'?

For data starting in 2020, '2021-01-01' separates 2020 from 2021; adding '2020-01-01' creates an empty pre-2020 partition, not a better yearly split.

Why rebuild the clustered index on a partition scheme instead of a filegroup?

The index must be partition-aligned so a single yearly partition can be rebuilt or reindexed; rebuilding on [PRIMARY] leaves it nonaligned and forces whole-table maintenance.

Configuring the GitHub MCP Server in Visual Studio via OAuth

Why is storing a PAT in the mcp or settings file wrong for this GitHub MCP setup?

The question requires OAuth authentication, so Visual Studio signs in interactively and no token is written to configuration. Hard-coding a PAT with the repo scope also creates a credential-leak risk in the repository.

Why not use the .vscode path when configuring the GitHub MCP Server in Visual Studio 2026?

The .vscode folder is Visual Studio Code's configuration layout. Visual Studio 2026 reads project-scoped MCP servers from a .mcp.json file in the solution root, so only that path registers the server for Copilot Chat in Visual Studio.

Does the CustomerProfiles schema satisfy PII and RLS requirements?

Does DDM mask rows that RLS filters out in dbo.CustomerProfiles?

No. The RLS filter predicate is evaluated first, so filtered rows never reach the result set and DDM has nothing to mask.

Can Azure SQL server admins see all dbo.CustomerProfiles rows when using the app?

Not automatically. If the application connects with a non-admin login, RLS applies to that login; administrator bypass does not follow the app connection.

Optimizing Azure SQL Dashboard Queries with Nonclustered Indexes

Why not use a clustered index on LastUpdatedUtc?

A clustered index determines physical storage order. Since the query filters by FleetId, indexing on LastUpdatedUtc would require scanning many rows before filtering, whereas FleetId provides direct access.

What makes an index 'covering' in this scenario?

An index is covering when it contains all columns referenced in the query's WHERE and SELECT clauses. Here, including FleetId, LastUpdatedUtc, EngineStatus, and BatteryHealth allows the engine to satisfy the request entirely from the index.

Minimizing CPU for Azure SQL Embedding Updates

Why can't I use a trigger to generate embeddings immediately?

Triggers run synchronously within the database transaction. Calling AI_GENERATE_EMBEDDINGS inside a trigger consumes significant SQL Server CPU and locks resources, violating the requirement to minimize DB CPU.

Is hourly regeneration ever acceptable for vector search?

Only if real-time accuracy isn't critical and the dataset is small. For millions of rows, a full scan hourly causes severe performance degradation and is not considered an efficient maintenance strategy.

Querying Blocking Chains in Azure SQL with T-SQL

Why use sys.dm_exec_requests over sys.dm_os_waiting_tasks?

sys.dm_exec_requests provides direct access to session IDs and blocking relationships, making it easier to construct a self-referencing join for chain analysis.

What is the purpose of OUTER APPLY in this query?

OUTER APPLY allows you to execute a function (like getting SQL text) for each row in the left table, ensuring blocked sessions are included even if they lack immediate metadata.

Fabric GraphQL API: Can SqlUsers Query or Edit SalesApi?

Does View and Edit GraphQL item allow SqlUsers to run queries against SalesApi?

No. Running queries and mutations requires the separate Run Queries and Mutations permission on the SalesApi item.

Does the SalesDB connection option change whether SqlUsers can read data through SalesApi?

No. Without Run Queries and Mutations, the API cannot execute the query regardless of the connection identity or SSO setting.

Azure SQL Blocking from Sleeping Session with Open Transaction

Why isn't this a deadlock?

Deadlocks are resolved immediately by killing one session. This session remains sleeping, indicating it is waiting, not deadlocked.

What does open_transaction_count=1 mean?

It means the session has begun a transaction but hasn't finished it, keeping all acquired locks active until commit or rollback.

How to Build a Patient Transaction Running Total in T-SQL for DP-800?

Why must the running total use ROWS UNBOUNDED PRECEDING instead of the default frame?

The default RANGE frame aggregates all rows tied on TransactionDate, so same-day transactions show the same total. ROWS UNBOUNDED PRECEDING adds one row at a time for a true running total.

Why use an inline table-valued function rather than a stored procedure for patient transactions?

An inline TVF returns a rowset that can be joined or CROSS APPLY-ed and is inlined by the optimizer. A stored procedure cannot be referenced in a FROM clause, so it fails the join requirement.

Passwordless On-Premises App Connection to Azure SQL DB1

Why can't the on-premises TransactionProcessing app use a system-assigned managed identity?

Managed identities are only issued for Azure-hosted resources and their tokens come from the Azure Instance Metadata Service, which an on-premises server cannot reach. A service principal registered in Microsoft Entra ID is required instead.

Is a shared access key considered a passwordless connection to Azure SQL Database?

No. A shared access key is a stored secret that must be configured and rotated manually, which is exactly the hard-coded credential problem the security requirement removes. Microsoft Entra ID authentication via service principal is the passwordless path.

Resolving System Object References in Azure SQL Database Projects

How do I actually resolve system object references in SQL DB Projects?

You must configure the .sqlproj file to include the appropriate system reference paths or explicit references to Azure SQL system schemas.

What does the -bl flag do in dotnet build?

The -bl flag generates a binary log file for diagnostics; it does not affect which files are compiled or referenced.

GitHub Actions Workflow for an SDK-Style SQL Database Project

Does building an SDK-style SQL database project validate the schema?

Yes. dotnet build compiles the project model and fails on unresolved objects or invalid schema references, so validation is not limited to the deployment action.

Why does the workflow not deploy on a pull request?

The deploy job depends on a successful build and is gated to pushes to main; pull requests can still run the build and test steps without publishing to db1.

What is the role of SqlPackage in the deploy job?

SqlPackage publishes the built DACPAC to db1 and computes a deployment plan, which also verifies that the schema change can be applied to the target database.

Optimizing JSON Queries with Computed Columns and Covering Indexes

Why can't I just create an index directly on the JSON column?

Standard indexes cannot parse the internal structure of nvarchar(max) JSON data. You must extract the scalar value into a computed column first to make it indexable.

What is the purpose of the INCLUDE clause in the index?

The INCLUDE clause adds non-key columns to the index leaf level. This allows the query to be satisfied entirely by the index (covering index), avoiding costly key lookups to the base table.

Configuring Azure SQL for Functions Trigger Binding

Why can't I use Change Data Capture (CDC) for the Azure Functions SQL trigger?

CDC is a heavier feature designed for detailed change history and auditing. The Azure Functions SQL trigger binding is specifically architected to use the lighter-weight Change Tracking feature for real-time notifications.

Does enabling Change Tracking impact performance significantly?

Change Tracking is designed to be low-overhead compared to CDC. It records primary key changes rather than full row snapshots, making it efficient for triggering external events like Azure Functions.

Azure SQL Indexing Strategy for Mixed OLTP and Analytics Workloads

Why not use a clustered columnstore index instead?

A clustered columnstore index transforms the entire table into a columnstore format. While good for pure analytics, it can significantly degrade OLTP insert/update performance. A nonclustered columnstore index sits alongside the existing clustered rowstore index, allowing the OLTP workload to remain optimized on the rowstore while offloading analytics to the columnstore.

Can a filtered index support near-real-time analytics?

No. A filtered index is a type of nonclustered index that covers a subset of rows. It is optimized for specific lookups or small range scans based on a predicate. It does not provide the compression and vectorized execution benefits needed for large-scale analytical aggregates across the table.

Optimizing Azure SQL Reporting with Columnstore and Rowstore Indexes

Why not use a Nonclustered Columnstore Index?

A Nonclustered Columnstore Index adds storage overhead and complexity. Since the question asks to minimize storage and the primary access path is scanning the entire table for reports, making the Columnstore index Clustering (the base table structure) is the most efficient approach.

Does a Clustered Rowstore Index work for large tables?

It works functionally but fails the 'minimize storage' requirement. A standard B-tree rowstore index does not compress data as effectively as a columnstore index, leading to higher storage costs for a 10 TB table.

SQL Server Scalar UDF vs Multi-Statement TVF Execution

Can I use EXEC to call a scalar user-defined function?

No. Scalar UDFs must be invoked within a SELECT list or assigned to a variable using SET. Using EXEC results in a syntax error.

Why do multi-statement TVFs cause inconsistent execution plans?

The SQL Server Optimizer treats them as black boxes and often estimates a fixed row count (e.g., 100 rows), ignoring actual data distribution. This leads to suboptimal join strategies and plan instability.