Microsoft Developing AI-Enabled Database Solutions (DP-800)
Get full access to the updated question bank and confidently prepare for your exam.
Vendor
Microsoft
Certification
AI & Data
Content
62 Qs
Status
Verified
Updated
7 hours ago
Test the Practice Engine
Experience our interactive testing environment with free demo questions
Premium Bundle
Complete Success Suite
Save $34 Instantly
-
โFull PDF + Interactive Engine Everything you need to pass
-
โAll Advanced Question Types Drag & Drop, Hotspots, Case Studies
-
โPriority 24/7 Expert Support Direct line to certification leads
-
โ90 Days Free Priority Updates Stay current as exams change
Success Metric
98.4% Pass Rate
Standard Simulation
Practice Engine
One-Time Payment
-
Web-Based (Zero Install)
-
Real Testing Environment Virtual & Practice Modes
-
Interactive Engine Drag & Drop, Hotspots
-
60 Days Free Updates
Compatible with All Devices
Basic Tier
PDF Study Guide
Digital Access
- โ Exam Questions (PDF)
- โ Mobile Friendly
- โ 60 Days Updates
Verified 13-Question Preview (DP-800)
Verified Community
The CertoMetrics Standard.
Recommend the #1 platform for verified Microsoft certification resources.
Success Network
Help a Colleague Succeed.
Invite a peer to get their own updated DP-800 prep kit.
Exam Overview
The Microsoft DP-800 certification validates your expertise in designing and implementing intelligent database solutions leveraging Azure's powerful AI services. This credential is vital for professionals looking to infuse artificial intelligence and machine learning capabilities directly into their data infrastructure. By mastering topics like Azure Cognitive Search, integrating AI with Azure SQL Database and Cosmos DB, and developing robust ML solutions, you'll gain the skills to build smarter, more responsive applications. Achieving DP-800 demonstrates a critical ability to modernize data platforms, enhance decision-making processes, and unlock new insights from data, significantly boosting your career prospects in the rapidly evolving landscape of AI-driven data management and application development.
Questions
40-60
Passing Score
700/1000
Duration
100 Minutes
Difficulty
Intermediate
Level
Associate
Skills Measured
Career Path
Target Roles
Common Questions
Is the material up to date?
Yes. We update our question bank weekly to match the latest Microsoft standards. You get free updates for 90 days.
What format do I get?
You get instant access to both the **PDF** (for reading) and our **Premium Test Engine** (for exam simulation).
Is there a guarantee?
Absolutely. If you fail the DP-800 exam using our materials, we offer a full money-back guarantee.
When do I get the download?
Instantly. The download link is available in your dashboard immediately after payment is confirmed.
Free Study Guide Samples
Previewing updated DP-800 bank (13 Questions).
You need to meet the development requirements for the FeedbackJson column.
How should you complete the Transact-SQL query? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
The user needs to construct a T-SQL query that performs a full-text search, extracts a value from a JSON column, calculates a similarity score, and orders the results. The solution correctly identifies the appropriate T-SQL functions for each step based on the case study requirements.
-
SELECT Clause (First Box): The requirement is to 'Extract the customer feedback text from the JSON document'. The
JSON_VALUE(f.FeedbackJson, '$.text') AS FeedbackTextexpression is the correct choice. TheJSON_VALUEfunction is specifically designed to extract a scalar value (the feedback text) from a JSON string using a specified path ($.text). This makes the text available as a standard column in the result set. -
WHERE Clause (Second Box): The requirement is to 'Filter rows where the JSON text contains a keyword'. The case study mentions that the
FeedbackJsoncolumn has a full-text index. Therefore, using theCONTAINS(FeedbackJson, @Keyword)predicate is the correct and most performant method. It leverages the full-text index to efficiently find rows matching the keyword, which is superior to alternatives likeLIKEthat would cause a table scan. -
ORDER BY Clause (Third Box): The requirement is to 'Order the results by similarity score, with the highest score first'. The query already calculates this score in the SELECT list and assigns it the alias
SimilarityScore. The correct way to sort the results is to reference this alias in theORDER BYclause. SinceDESCis already provided, selectingSimilarityScorecompletes the logic.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/functions/json-value-transact-sql?view=sql-server-ver16
You have an Azure SQL database that contains a table named dbo.Orders.
You have an application that calls a stored procedure named dbo.usp_CreateOrder to insert rows into dbo.Orders.
When an insert fails, the application receives inconsistent error details.
You need to implement error handling to ensure that any failures inside the procedure abort the transaction and return a consistent error to the caller.
How should you complete the stored procedure? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Audit of the Correct Answer
The provided solution correctly implements standard T-SQL transactional error handling using a TRY/CATCH block.
โ Step 1:SET @OrderId = SCOPE_IDENTITY() matches with -> First Blank (inside TRY block)Reasoning: This statement must execute after a successful
INSERT to capture the auto-generated identity value for the new order. The SCOPE_IDENTITY() function returns the last identity value created in the current scope, which is then assigned to the @OrderId output parameter. This occurs before the transaction is committed.โ Step 2:
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION matches with -> Second Blank (inside CATCH block)Reasoning: If an error occurs within the
TRY block, control transfers to the CATCH block. This line checks if a transaction is currently active (@@TRANCOUNT > 0) and, if so, rolls it back. This prevents partial data modifications and ensures atomicity. The subsequent THROW statement then re-raises the original error to the caller.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/language-elements/try-catch-transact-sql?view=sql-server-ver16
Your team is developing an Azure SQL dataset solution from a locally cloned GitHub repository by using Microsoft Visual Studio Code and GitHub Copilot Chat.
You need to disable the GitHub Copilot repository-level instructions for yourself without affecting other users.
What should you do?
Correct Option: A
The core requirement is to disable GitHub Copilot's repository-level instructions for yourself without affecting other users. This implies a user-specific configuration change.
User settings in Visual Studio Code are personal to an individual user and apply globally across all their VS Code instances unless overridden by workspace settings. Modifying your GitHub Copilot Chat user settings allows you to customize the extension's behavior for your personal use without impacting the shared repository or other team members' configurations.
Why other options are incorrect:
- Option B is incorrect: Adding a
--debugflag when starting the extension is used for troubleshooting and obtaining verbose logs. It does not disable or modify the functional behavior of repository-level instructions. - Option C is incorrect: Deleting
.github/copilot-instructions.mdwould remove the repository-level instructions for all users of the repository (once committed and pushed). This directly contradicts the requirement to disable them only for yourself without affecting others.
Reference: https://docs.github.com/en/copilot/github-copilot-chat/using-github-copilot-chat/customizing-github-copilot-chat
You have an Azure SQL database that contains the following SQL graph tables:
A NODE table named dbo.Person -
An EDGE table named dbo.Knows -
Each row in dbo.Person contains the following columns:
PersonID (int)
DisplayName (nvarchar(100))
You need to use a MATCH operator and exactly two directed Knows relationships to return the PersonID and DisplayName of people that are reachable from the person identified by an input parameter named @StartPersonId.
Which Transact-SQL query should you use?
Correct Option: D
MATCH operator defines the traversal pattern in a SQL Graph query.
The pattern (p1-(k1)->p2-(k2)->p3) means:
Start from p1 (the person identified by @StartPersonId),
Follow the first directed edge k1 to p2,
Then follow the second directed edge k2 to p3.
The query returns the PersonId and DisplayName of people reachable in exactly two hops.
You have a SQL database in Microsoft Fabric that contains a column named Payload. Payload stores customer data in JSON documents that have the following format.
Data analysis shows that some customers have subaddressing in their email address, for example, user1+promo@contoso.com.
You need to return a normalized email value that removes the subaddressing, for example, user1 +promo@contoso.com must be normalized to user1@contoso.com.
Which Transact-SQL expression should you use?
Correct Option: C
The problem requires normalizing email addresses by removing subaddressing (e.g., '+promo') while retaining the user part and the domain. Given an email like user1+promo@contoso.com, the goal is user1@contoso.com.
Option C uses REGEXP_REPLACE(JSON_VALUE(Payload, '$.customer_email'), '\+.*@', '@'). This expression first extracts the email using JSON_VALUE. Then, REGEXP_REPLACE applies the pattern \+.*@. The \+ matches the literal plus sign, .* matches any characters zero or more times, and @ matches the at sign. This pattern effectively captures everything from the '+' up to and including the first '@' sign of the domain. By replacing this entire matched segment with just '@', the subaddressing part is removed, achieving the desired normalization.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/functions/regexp-replace-transact-sql?view=sql-server-ver16
You have an Azure SQL database that contains a table named dbo.Orders. dbo.Orders contains a column named CreateDate that stores order creation dates.
You need to create a stored procedure that filters Orders by CreateDate for a single calendar day. The solution must be SARGable.
How should you complete the Transact-SQL code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
The provided solution correctly implements a SARGable query to filter records for a single calendar day. It avoids applying functions to the indexed column (CreateDate) in the WHERE clause, which allows the query optimizer to use an index seek for better performance.
Explanation of Choices
โ
Step 1: DATEADD(day, 1, @StartDate) matches with -> SET @EndDate =
Reasoning: To filter for a single day, we need a date range. This code sets the @EndDate variable to be the day after @StartDate. This creates the exclusive upper boundary for our search, ensuring we capture all time values within the target day up to midnight.
โ
Step 2: @StartDate matches with -> WHERE o.CreateDate >=
Reasoning: This sets the inclusive lower boundary of the date range. Comparing the CreateDate column directly with the @StartDate parameter is SARGable, as no function is applied to the column itself, allowing for efficient index usage.
โ
Step 3: @EndDate matches with -> AND o.CreateDate <
Reasoning: This sets the exclusive upper boundary using the previously calculated @EndDate. The condition CreateDate < @EndDate correctly includes all moments in time on @StartDate up to, but not including, the start of the next day. This completes the SARGable predicate.
Reference: https://learn.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver16#sargable-predicates
You have an Azure SQL database.
You need to create a scalar user-defined function (UDF) that returns the number of whole years between an input parameter named @OrderDate and the current date/time as a single positive integer. The function must be created in Azure SQL Database.
You write the following code.
What should you insert at line 05?
Correct Option: D
@OrderDate and the current date/time (GETDATE()) as a single positive integer. The output must be inserted at line 05, which is inside the BEGIN...END block of the UDF, thus requiring a RETURN statement.- Option D:
RETURN DATEDIFF(year, @OrderDate, GETDATE());correctly uses theDATEDIFFfunction.DATEDIFF(year, startdate, enddate)calculates the number of year boundaries crossed betweenstartdateandenddate. By placing@OrderDateas thestartdateandGETDATE()as theenddate, the function will return a positive integer representing the number of years if@OrderDateis earlier thanGETDATE(), satisfying the requirement for a positive integer. It also includes the necessaryRETURNkeyword for a scalar UDF.
Why the other choices are incorrect:
- Option A:
RETURN DATEDIFF(year, GETDATE(), @OrderDate);is incorrect because it reverses thestartdateandenddateparameters. If@OrderDateis in the past (e.g., '2023-01-01') andGETDATE()is '2024-01-01', this would return a negative number (-1), violating the requirement for a "single positive integer." - Option B:
DATEDIFF(month, @orderdate, GETDATE()) / 12is a more accurate way to calculate complete elapsed years (like age) by dividing the total months by 12 using integer division. However, it is missing the crucialRETURNstatement required for a scalar UDF at line 05. - Option C:
DATEPART(year, GETDATE()) - DATEPART(year, @orderdate)is incorrect. This approach only subtracts the year components, which does not accurately represent "whole years" elapsed. For example, if@OrderDateis '2023-12-31' andGETDATE()is '2024-01-01', this would return 1, even though only one day has passed, not a whole year.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql
You have an Azure SQL database.
You deploy Data API builder (DAB) to Azure Container Apps by using the mcr.microsoft.com/azure-databases/data-api-builder:latest image.
You have the following Container Apps secrets:
MSSQL_CONNECTION_STRING that maps to the SQL connection string
DAB_CONFIG_BASE64 that maps to the DAB configuration
You need to initialize the DAB configuration to read the SQL connection string.
Which command should you run?
Correct Option: B
โ
Option B (Correct)
Reasoning: Data API builder (DAB) allows referencing environment variables for sensitive information like connection strings directly within its configuration. The syntax for this is @env('ENVIRONMENT_VARIABLE_NAME'). In this scenario, the Azure Container Apps secret for the SQL connection string is named MSSQL_CONNECTION_STRING. Therefore, the command needs to instruct DAB to read this environment variable. The command dab init --database-type mssql --connection-string โ@env(โMSSQL_CONNECTION_STRINGโ)โ --host-mode Production --config dab-config.json correctly specifies the database type as MSSQL, points the connection string to the MSSQL_CONNECTION_STRING environment variable using the proper @env() syntax, sets the host mode to Production, and specifies the output configuration file.
โ Why the other choices are incorrect:
- Option A is incorrect: The
secretref:syntax is used within the Data API builder configuration file itself to reference secrets managed by the DAB runtime, not directly in thedab initcommand for an environment variable. Additionally,DAB_CONFIG_BASE64is described as mapping to the DAB configuration, not the SQL connection string. - Option C is incorrect: Similar to option A,
secretref:is not the correct syntax for referencing environment variables during thedab initcommand. Even if it were,mssql-connection-stringdoes not match the provided secret nameMSSQL_CONNECTION_STRING. - Option D is incorrect: While
@env()is the correct syntax for referencing environment variables,DAB_CONFIG_BASE64is stated to map to the DAB configuration, not the SQL connection string. Using this would attempt to use the base64 encoded configuration as the database connection string, which is incorrect.
Reference: https://azure.github.io/data-api-builder/docs/configuration-file/secrets/#environment-variables
You have a SQL database in Microsoft Fabric that contains a nvarchar (max) column named MessageText. An ID is always contained within the first paragraph of MessageText.
You need to write a Transact-SQL query that uses REGEXP_SUBSTR to extract the ID from MessageText.
What should you include in the query?
Correct Option: B
While REGEXP_SUBSTR in Microsoft Fabric's SQL database (based on modern SQL Server) supports nvarchar(max) directly as an input data type, it is a common and recommended best practice to cast nvarchar(max) columns to a smaller fixed-length type like nvarchar(4000) when the relevant data is known to reside within the initial characters. The question states that the ID is "always contained within the first paragraph of MessageText", strongly implying the ID is at the beginning of the string and will fit within 4000 characters. Casting to nvarchar(4000) before calling REGEXP_SUBSTR can significantly improve performance by reducing the amount of data the regular expression engine needs to process, especially if MessageText can contain very large strings. This approach optimizes resource usage without sacrificing data integrity for the specific task of extracting an ID from the beginning of the text.
- A: Apply STRING_ESCAPE(MessageText, โjsonโ) before calling REGEXP_SUBSTR. STRING_ESCAPE is used to escape special characters for JSON formatting. It would alter the content of MessageText, potentially making regex matching incorrect, and is irrelevant to the requirement of extracting an ID or handling nvarchar(max) types for REGEXP_SUBSTR.
- C: Add a COLLATE Latin1_General_CS_AS clause to MessageText before calling REGEXP_SUBSTR. COLLATE specifies the collation for string operations, affecting character comparison rules (e.g., case sensitivity). While collation can be relevant for the regex pattern itself, it does not address the primary concern of efficiently processing an nvarchar(max) column with REGEXP_SUBSTR.
- D: Run TRY_CONVERT(varchar(max), MessageText) before calling REGEXP_SUBSTR. Converting nvarchar(max) to varchar(max) changes the data type from Unicode to non-Unicode. This can lead to data loss if MessageText contains non-ASCII characters. Furthermore, it doesn't resolve any potential performance issues or best practices related to processing a very long string with REGEXP_SUBSTR, as varchar(max) can also be extremely large. The underlying challenge with large 'max' types would likely persist.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/functions/regexp-substr-transact-sql?view=sql-server-ver16
You have an Azure SQL database that contains database-level Data Definition Language (DDL) triggers, including a trigger named ddl_Audit.
You need to prevent ddl_Audit from firing during the next deployment. The trigger object must remain in place.
Which Transact-SQL statement should you use?
Correct Option: D
ddl_Audit, from firing during a deployment while ensuring the trigger object remains in place. The Transact-SQL statement specifically designed for this purpose is DISABLE TRIGGER. This command deactivates the specified trigger, rendering it inert without removing its definition from the database. Consequently, the trigger will not execute when its associated DDL event occurs. To reactivate it, the ENABLE TRIGGER statement would be used. While ALTER TRIGGER can be used to disable DML triggers, for DDL and logon triggers, DISABLE TRIGGER is the appropriate and recommended command.
Reference: https://learn.microsoft.com/en-us/sql/t-sql/statements/disable-trigger-transact-sql?view=sql-server-ver16
Your development team uses GitHub Copilot Chat in Microsoft SQL Server Management Studio (SSMS) to generate and run Transact-SQL queries against an Azure SQL database named DB1. DB1 contains tables that store sensitive customer data.
You need to ensure that any Transact-SQL queries that run from GitHub Copilot Chat in SSMS are restricted by the same permissions as the developerโs database login.
What prevents the GitHub Copilot Chat-run queries from accessing data beyond the developerโs access?
Premium Solution Locked
Unlock all 62 answers & explanations
You have an Azure SQL database named AdventureWorksDB that contains a table named dbo.Employee.
You have a C# Azure Functions app that uses an HTTP-triggered function with an Azure SQL input binding to query dbo.Employee.
You are adding a second function that will react to row changes in dbo.Employee and write structured logs.
You need to configure AdventureWorksDB and the app to meet the following requirements:
Changes to dbo.Employee must trigger the new function within five seconds.
Each invocation must process no more than 100 changes.
Which two database configurations should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Premium Solution Locked
Unlock all 62 answers & explanations
You have a Microsoft SQL Server 2025 database that contains a table named dbo.CustomerMessages. dbo.CustomerMessages contains two columns named MessageID (int) and MessageRaw (nvarchar(max)).
MessageRaw can contain a phone number in multiple formats, and some rows do NOT contain a phone number.
You need to write a single SELECT query that meets the following requirements:
The query must return MessageID, RawNumber, DigitsOnly, and PhoneStatus.
RawNumber must contain the first substring that matches a phone-number pattern, or NULL if no match exists.
DigitsOnly must remove all non-digit characters from RawNumber, or return NULL.
PhoneStatus must return valid when a phone number exists in MessageRaw, otherwise return Missing.
How should you complete the Transact-SQL query? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Premium Solution Locked
Unlock all 62 answers & explanations
Full Question Bank Locked
You have reached the end of the free study guide preview. Upgrade now to unlock all 62 questions and the full simulation engine.
Certification Path
Related Certifications
Customer Reviews
Global Community Feedback
David M.
"The practice engine is incredible. It feels exactly like the real testing environment and helped me build so much confidence."
Sarah J.
"The PDF is very well organized and the explanations for the answers are actually helpful, not just random text."
Michael C.
"I was skeptical, but the content is high quality and definitely worth the price. I passed on my first try!"