Spring Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > Microsoft > Microsoft Certified: SQL AI Developer > DP-800

DP-800 Developing AI-Enabled Database Solutions Question and Answers

Question # 4

You need to create a table in the database to store the telemetry data. You have the following Transact-SQL code.

Full Access
Question # 5

You need to meet the database performance requirements for maintenance data

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.

Full Access
Question # 6

You need to recommend a solution for the development team to retrieve the live metadata. The solution must meet the development requirements.

What should you include in the recommendation?

A.

Export the database schema as a .dacpac file and load the schema into a GitHub Copilot context window.

B.

Add the schema to a GitHub Copilot instruction file.

C.

Use an MCP server

D.

Include the database project in the code repository.

Full Access
Question # 7

You need to recommend a solution that will resolve the ingestion pipeline failure issues. Which two actions should you recommend? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

A.

Enable snapshot isolation on the database.

B.

Use a trigger to automatically rewrite malformed JSON.

C.

Add foreign key constraints on the table.

D.

Create a unique index on a hash of the payload.

E.

Add a check constraint that validates the JSON structure.

Full Access
Question # 8

You need to generate embeddings to resolve the issues identified by the analysts. Which column should you use?

A.

vehicleLocation

B.

incidentDescrlption

C.

incidentType

D.

SeverityScore

Full Access
Question # 9

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.

Full Access
Question # 10

You have an Azure SQL database that contains a table named stores, stores contains a column named description and a vector column named embedding.

You need to implement a hybrid search query that meets the following requirements:

• Uses full-text search on description for the keyword portion

• Returns the top 20 results based on a combined score that uses a weighted formula of 60% vector distance and 40% full-text rank

How should you configure the query components? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Full Access
Question # 11

You have an Azure SQL database named SalesDB on a logical server named sales-sql01.

You have an Azure App Service web app named OrderApi that connects to SalesDB by using SQL authentication.

You enable a user-assigned managed identity named OrderApi-Id for OrderApi.

You need to configure OrderApi to connect to SalesDB by using Microsoft Entra authentication. The managed identity must have read and write permissions to SalesDB.

Which Transact-SQL statements should you run in SalesDB?

A.

CREATE LOGIN [OrderApi-Id] FROM EXTERNAL PROVIDER;

ALTER ROLE db_datareader ADD MEMBER [OrderApi-Id];

ALTER ROLE db_datawriter ADD MEMBER [OrderApi-Id];

B.

CREATE USER [OrderApi-Id] WITH PASSWORD = ' P@ssw0rd! ' ;

ALTER ROLE db_datareader ADD MEMBER [OrderApi-Id];

ALTER ROLE db_datawriter ADD MEMBER [OrderApi-Id];

C.

CREATE USER [OrderApi-Id] FROM EXTERNAL PROVIDER;

ALTER ROLE db_datareader ADD MEMBER [OrderApi-Id];

ALTER ROLE db_datawriter ADD MEMBER [OrderApi-Id];

D.

CREATE LOGIN [OrderApi-Id] WITH PASSWORD = ' P@ssw0rd! ' ;

ALTER SERVER ROLE sysadmin ADD MEMBER [OrderApi-Id];

Full Access
Question # 12

You have a Microsoft SQL Servei 2025 database that contains a table named dbo.Customer-Messages, dbo. Customer-Messages contains two columns named HessagelD (int) and MessageRaw (nvarchar(iux)).

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 Message ID, 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? lo 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.

Full Access
Question # 13

You have an Azure SQL database that contains tables named dbo.ProduetDocs and dbo.ProductuocsEnbeddings. dbo.ProductOocs contains product documentation and the following columns:

• Docld (int)

• Title (nvdrchdr(200))

• Body (nvarthar(max))

• LastHodified (datetime2)

The documentation is edited throughout the day. dbo.ProductDocsEabeddings contains the following columns:

• Dotid (int)

• ChunkOrder (int)

• ChunkText (nvarchar(aax))

• Embedding (vector(1536))

The current embedding pipeline runs once per night

Vou need to ensure that embeddings are updated every time the underlying documentation content changes The solution must NOT ' equire a nightly batch process.

What should you include in the solution?

A.

fixed-size chunking

B.

a smaller embedding model

C.

table triggers

D.

change tracking on dbo.ProductDocs

Full Access
Question # 14

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?

A.

GitHub Copilot Chat runs queries in a read-only sandbox that is isolated from production database permissions.

B.

GitHub Copilot Chat runs queries by using the developer ' s database identity and permissions.

C.

GitHub Copilot Chat filters query results on (he client side to remove rows the developer is unauthorized to see.

D.

GitHub Copilot Chat uses different row-level security (RLS) policies than the developer.

Full Access
Question # 15

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_tresteOrder 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, tach 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.

Full Access
Question # 16

You have a SQL database in Microsoft Fabric that contains a table named dbo.Orders, dbo.Orders has a clustered index, contains three years of data, and is partitioned by a column named OrderDate by month.

You need to remove all the rows for the oldest month. The solution must minimize the impact on other queries that access the data in dbo.orders.

Solution: Identify the partition number for the oldest month, and then run the following Transact-SQL statement.

TRUNCATE TABIE dbo.Orders

WITH (PARTITIONS (partition number));

Does this meet the goal?

A.

Yes

B.

No

Full Access
Question # 17

You have a SQL database in Microsoft Fabric that contains a column named Payload. pay load 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, user! + promo@contoso.com must be normalized to userl@contoso.com.

Which Transact SQL expression should you use?

A.

REGEXP_REPLACE(JSON_VALUE(Payload, ' $.customer_email ' ), ' \+.*$ ' , ' ' )

B.

REGEXP_SUBSTR(JSON_VALUE(Payload, ' $.customer_email ' ), ' ^[^+]+@.*$ ' )

C.

REGEXP_REPLACE(JSON_VALUE(Payload, ' $.customer_email ' ), ' \+.*@ ' , ' @ ' )

D.

REGEXP_REPLACE(JSON_VALUE(Payload, ' $.customer_email ' ), ' \+.* ' , ' ' )

Full Access
Question # 18

You have an Azure SQL table that contains the following data.

You need to retrieve data to be used as context for a large language model (LLM). The solution must minimize token usage.

Which formal should you use to send the data to the LLM?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access