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

Free Microsoft DP-800 Practice Exam with Questions & Answers

Questions 1

You have a GitHub Actions workflow that builds and deploys an Azure SQL database. The schema is stored in a GitHub repository as an SDK-style SQL database project.

Following a code review, you discover that you need to generate a report that shows whether the production schema has diverged from the model in source control.

Which action should you add to the pipeline?

Options:
A.

SqlPackage.exe /Action:DriftReport

B.

SqlPackage.exe /Action:DeployReport

C.

SqlPackage.exe /Action:Extract

D.

SqlPackage.exe /Action:Script

Microsoft DP-800 Premium Access
Questions 2

You have an Azure SQL database that has Query Store enabled

Query Performance Insight shows that one stored procedure has the longest runtime. The procedure runs the following parameterized query.

DP-800 Question 2

The dbo.orders table has approximately 120 million rows. Customer-id is highly selective, and orderOate is used for range filtering and sorting.

Vou have the following indexes:

• Clustered index: PK_Orders on (Orderld)

• Nonclustered index: lx_0rders_order-Date on (OrderDate) with no included columns

An actual execution plan captured from Query Store for slow runs shows the following:

• An index seek on ixordersorderDate followed by a Key Lookup (Clustered) on PKOrders for customerid, status, and TotalAnount

• A sort operator before top (50), because the results are ordered by orderDate DESC

For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.

DP-800 Question 2

Options:
Questions 3

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: Run the following Transact-SQL statement.

DELETE FROM dbo.Orders

WHERE OrderDate < DATEADD(nonth, -36, SYSUTCDATETIME());

Does this meet the goal?

Options:
A.

Yes

B.

No

Questions 4

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?

Options:
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];

Questions 5

You have a GitHub Codespaces environment that has GitHub Copilot Chat installed and is connected to a SQL database in Microsoft Fabric named DB1 DB1 contains tables named Sales.Orders and Sales.Customers.

You use GitHub Copilot Chat in the context of DB1 .

A company policy prohibits sharing customer Personally Identifiable Information (Pll), secrets, and query result sets with any Al service.

You need to use GitHub Copilot Chat to write and review Transact-SQL code for a new stored procedure that will join Sales.Orders to sales .Customers and return customer names and email addresses. The solution must NOT share the actual data in the tables with GitHub Copilot Chat.

What should you do?

Options:
A.

From Sales.Customers, paste several rows that include email addresses into a chat, so that GitHub Copilot Chat can infer edge cases.

B.

Run a select statement that returns customer names and email addresses and provide the result set to GitHub Copilot Chat so that GitHub Copilot Chat can generate the stored procedure.

C.

Provide the database connection string to GitHub Copilot Chat so that GitHub Copilot Chat can validate the stored procedure.

D.

Ask GitHub Copilot Chat to generate the stored procedure by using schema details only.

Questions 6

You have a Microsoft SQL Server 2025 instance that contains a database named SalesDB SalesDB supports a Retrieval Augmented Generation (RAG) pattern for internal support tickets. The SQL Server instance runs without any outbound network connectivity.

You plan to generate embeddings inside the SQL Server instance and store them in a table for vector similarity queries.

You need to ensure that only a database user account named AlApplicationUser can run embedding generation by using the model.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Options:
A.

Grant the control permission on SalesDB to AlApplicationUser.

B.

Create a database audit specification on SalesDB owned by AlApplicationUser.

C.

Grant the execute permission on the external model project to AlApplicationUser.

D.

Create an external model project by using ONNX runtime and local paths.

E.

Create an external model project that points to a Microsoft Foundry REST endpoint.

Questions 7

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.

DP-800 Question 7

Options:
Questions 8

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 processes 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.

Options:
A.

Create an AFTER trigger on dbo.Employee for Data Manipulation Language (DML).

B.

SetSql Trigger MaxBatchSize to 100.

C.

Enable change tracking on the dbo. Employee table.

D.

Enable change tracking at the database level.

E.

Set Sql_Trigger_PollingIntervalMs to 5000.

F.

Enable change data capture (CDC) for dbo.Employee table changes

Questions 9

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 0orderDate and the current date/time as a single positive integer. The function must be created in Azure SQL Database. You write the following code.

DP-800 Question 9

What should you insert at line 05?

Options:
A.

RETURN DATEDIFF(year, GETDATE(), @OrderDate);

B.

DATEDIFF(month, @orderdate, GETDATE()) / 12

C.

DATEPART(year, GETDATE()) - DATEPART(year, @orderdate)

D.

RETURN DATEDIFF(year, @OrderDate, GETDATE());

Questions 10

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?

Options:
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.