Microsoft Developing AI-Enabled Database Solutions DP-800 Dumps in PDF

Free Microsoft DP-800 Real Questions (page: 6)

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?

  1. dab init --database-type mssql --connection-string
    “secretref:DAB_CONFIG_BASE64” --host-mode Production --config dab-config.json
  2. dab init --database-type mssql --connection-string “@env
    (‘MSSQL_CONNECTION_STRING’)” --host-mode Production --config dab-config.json
  3. dab init --database-type mssql --connection-string “secretref:mssql-connection-
    string” --host-mode Production --config dab-config.json
  4. dab init --database-type mssql --connection-string “@env(‘DAB_CONFIG_BASE64’)”
    ---host-mode Production --config dab-config.json

Answer(s): B

Explanation:

To initialize the Data API builder (DAB) configuration to read the SQL connection string from your Container Apps secret, use the following dab init command:
dab init --database-type mssql --connection-string "@env('MSSQL_CONNECTION_STRING')"
Why this command works --database-type mssql: Specifies that you are connecting to an Azure SQL or SQL Server database.
@env('MSSQL_CONNECTION_STRING'): This is the built-in DAB function that tells the runtime to substitute the value of the specified environment variable at load time. Since your Container Apps secret is mapped to MSSQL_CONNECTION_STRING, DAB will resolve it automatically when the container starts.
--connection-string: This flag sets the data source connection. By using the @env() syntax here, you ensure the secret remains out of the static configuration file.


Reference:



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?

  1. Apply STRING_ESCAPE(MessageText, ‘json’) before calling REGEXP_SUBSTR.
  2. Cast MessageText to nvarchar (4000) before calling REGEXP_SUBSTR.
  3. Add a COLLATE Latin1_General_CS_AS clause to MessageText before calling REGEXP_SUBSTR.
  4. Run TRY_CONVERT(varchar(max), MessageText) before calling REGEXP_SUBSTR.

Answer(s): A

Explanation:

To extract an ID (e.g., alphanumeric) from the first paragraph of an nvarchar(max) column in Microsoft Fabric using STRING_ESCAPE, use STRING_SPLIT or CHARINDEX to isolate the first paragraph, apply STRING_ESCAPE, and a regex pattern.
Note: T-SQL does not natively support a REGEXP_SUBSTR function like Oracle/Snowflake. The solution below uses STRING_ESCAPE followed by pattern matching via PATINDEX and SUBSTRING to extract a typical alphanumeric ID.


Reference:



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?

  1. ALTER TRIGGER
  2. ALTER DATABASE
  3. ALTER SERVER AUDIT SPECIFICATION
  4. DISABLE TRIGGER
  5. ALTER DATABASE AUDIT SPECIFICATION

Answer(s): D

Explanation:

The DISABLE TRIGGER Transact-SQL statement is the correct and appropriate solution for this scenario.
Solution Breakdown To prevent a specific database-level DDL trigger from firing without removing the object, you can use the following syntax:
DISABLE TRIGGER [TriggerName] ON DATABASE;
Key Considerations Object Retention: A disabled trigger remains in the database as an object and is visible in catalog views like sys.triggers, but it will not execute when its programmed events occur.
Reactivation: You can re-enable the trigger after your deployment is complete using the ENABLE TRIGGER statement.
Permissions: To execute this command on a database-scoped DDL trigger in Azure SQL, you must have at least ALTER ANY DATABASE DDL TRIGGER permission.


Reference:



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?

  1. GitHub Copilot Chat runs queries in a read-only sandbox that is isolated from production database
    permissions.
  2. GitHub Copilot Chat runs queries by using the developer’s database identity and permissions.
  3. GitHub Copilot Chat filters query results on the client side to remove rows the developer is unauthorized to
    see.
  4. GitHub Copilot Chat uses different row-level security (RLS) policies than the developer.

Answer(s): B

Explanation:

GitHub Copilot Chat in SSMS acts as an extension of the user, meaning it does not have its own separate service account or elevated privileges.
It operates within the security context of your active connection. If your database login is restricted by Role-Based Access Control (RBAC), Row-Level Security (RLS), or specific DENY permissions on sensitive tables, Copilot cannot bypass those hurdles to fetch or manipulate data you couldn't otherwise access manually.


Reference:



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.

  1. Create an AFTER trigger on dbo.Employee for Data Manipulation Language (DML).
  2. Set Sql_Trigger_MaxBatchSize to 100.
  3. Enable change tracking on the dbo.Employee table.
  4. Enable change tracking at the database level.
  5. Set Sql_Trigger_PollingIntervalMs to 5000.
  6. Enable change data capture (CDC) for dbo.Employee table changes.

Answer(s): C,D

Explanation:

To use an Azure SQL trigger in an Azure Functions app, you must perform the following two database configurations:
Enable change tracking on the database: You must turn on change tracking at the database level to allow the system to monitor for row-level modifications.
Enable change tracking on the table: You must specifically enable change tracking for the table that the second function is monitoring.
These configurations are mandatory for the Azure SQL trigger to detect inserts, updates, and deletes.
Incorrect: Configuring Timing and Batching While the database setup enables the tracking mechanism, the specific performance requirements (triggering within five seconds and processing no more than 100 changes) are managed through application settings in the Azure Function app, rather than database-side configurations:
Sql_Trigger_MaxBatchSize: Set this to 100 to ensure each invocation processes no more than 100 changes.
Sql_Trigger_PollingIntervalMs: Set this to 5000 (5,000 milliseconds) or less to ensure changes are detected and triggered within five seconds.


Reference:



DRAG DROP (Drag and Drop is not supported)
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.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:


Box 1: REGEXP_SUBSTR( RawNumber must contain the first substring that matches a phone-number pattern, or NULL if no match exists.
The best Transact-SQL statement to extract the first substring matching a regular expression is the newly introduced REGEXP_SUBSTR function.
This function specifically returns the portion of a string that matches a given pattern, or NULL if no match is found. To satisfy your requirement using the provided pattern, the query would be:
SELECT REGEXP_SUBSTR(PhoneNumberColumn, '\d{3}[)\-\s]*\d{3}[ \-\s]*\d{4}') FROM YourTableName; Use code with caution.
Why this is the best choice: Native Support: Prior to SQL Server 2025, performing regex extraction required complex workarounds like CLR assemblies or nested string functions.
Automatic NULL Handling: If the pattern does not exist within the string, REGEXP_SUBSTR naturally returns NULL.
Default Behavior: By default, the function retrieves the first occurrence (position 1, occurrence 1), though these can be customized using optional parameters if needed. Pattern Correction: Note that standard regex syntax uses curly braces {} for quantifiers (e.g., \d{3}) rather than parentheses ().
Box 2: REGEXP_REPLACE( REGEXP_SUBSTR( DigitsOnly must remove all non-digit characters from RawNumber, or return NULL.
The solution to extract only digits from the RawNumber column in Microsoft SQL Server 2025 using a single T-SQL query is: SELECT REGEXP_REPLACE( REGEXP_SUBSTR(RawNumber, '\d{3}[)\-\s]*\d{3}[ \-\s]*\d{4}'), '\D', '' ) AS CleanedNumber FROM YourTableName;
1. Extract valid phone pattern
The inner function, REGEXP_SUBSTR(RawNumber, '\d{3}[)\-\s]*\d{3}[ \-\s]*\d{4}'), searches the RawNumber string for a specific pattern matching a standard 10-digit phone number.
Pattern: It looks for 3 digits, followed by optional separators like closing parentheses, hyphens, or spaces, followed by another 3 digits, more optional separators, and finally 4 digits. Result: If a match is found, it returns that specific substring. If no match exists, it returns NULL.
2. Strip non-digit characters The outer function, REGEXP_REPLACE(..., '\D', ''), takes the substring extracted in the previous step and cleans it.
Pattern: The \D regular expression matches any character that is not a digit (0-9). Replacement: It replaces every non-digit character with an empty string (''), effectively removing them. Result: The final output is a string containing only the 10 digits of the phone number.
3. Handle null values Because REGEXP_SUBSTR returns NULL if the pattern isn't found, the entire expression will result in NULL for any row that doesn't contain a validly formatted 10-digit number. This ensures you only get cleaned data for entries that meet your specified criteria
Box 3: REGEXP_LIKE( PhoneStatus must return valid when a phone number exists in MessageRaw, otherwise return Missing.
With the introduction of native regular expression support in SQL Server 2025, the best approach to validate the phone number column using the provided regex pattern is by utilizing the REGEXP_LIKE function within a CASE expression.
SELECT PhoneNumberColumn, CASE WHEN REGEXP_LIKE(PhoneNumberColumn, '\d{3}[)\-\s]*\d{3}[ \-\s]*\d{4}') THEN 'Valid' ELSE 'Missing' END AS ValidationStatus FROM YourTableName;
Details: REGEXP_LIKE(column, pattern): This function directly checks if the nvarchar column matches the specified regular expression.
Regex Correction: The provided regex '\d(3)[)\-\s]*\d(3)[ \-\s]*\d(4)" requires a slight adjustment to \d{3} (curly braces) for standard quantifier syntax in many regex engines, though the logic remains the same (3 digits, separators, 3 digits, separators, 4 digits).
CASE WHEN...: Evaluates the regex match and returns 'Valid' if true, 'Missing' otherwise.


Reference:



You have an Azure SQL database that contains a table named Rooms. Rooms was created by using the following Transact-SQL statement.

You discover that some records in the Rooms table contain NULL values for the Owner field.
You need to ensure that all future records have a value for the Owner field.
What should you add?

  1. a foreign key
  2. a check constraint
  3. a nonclustered index
  4. a unique constraint

Answer(s): B

Explanation:

A CHECK constraint is one way to do it.
If you use a CHECK constraint (e.g., CHECK (ColumnName IS NOT NULL)), the database will indeed reject new NULL entries. However, the column's metadata will still technically allow NULLs, which can sometimes affect how external tools or APIs interact with your schema.


Reference:



DRAG DROP (Drag and Drop is not supported)
You have a SQL database in Microsoft Fabric that contains a table named WebSite.Logs. WebSite.Logs stores application telemetry data. WebSite.Logs contains a nvarchar (max) column named log that stores JSON documents.
You have a daily report that filters by the $.severity JSON property and returns LogId, LogDateTime, and log. The report frequently causes full table scans.
You need to modify WebSite.Logs to support efficient filtering by $.severity and avoid key lookups for the columns returned by the report.
How should you complete the Transact-SQL code to avoid full table scans? 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.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:


Box 1: AS JSON_VALUE([log], 'severity') PERSISTED To optimize the query and avoid both full table scans and key lookups, you should add a computed column for the JSON property and then include it in a non-clustered index that includes the other two required columns. The most appropriate ADD statement to define the JSON property as a persistent, indexable column is:
ALTER TABLE [YourTableName] ADD [JsonPropertyColumnName] AS JSON_VALUE([JsonColumnName], '$.YourPropertyPath') PERSISTED; Use code with caution.
Why this works: JSON_VALUE: Extracts the specific scalar value from the JSON document.
PERSISTED: Stores the value physically in the table, which is a prerequisite for creating certain types of indexes and ensures the calculation isn't repeated during every read.
Indexing: Once added, you can create a Non-Clustered Index on this new column and use the INCLUDE clause for the other two columns. This creates a "covering index," allowing the engine to satisfy the report entirely from the index without hitting the base table (avoiding the key lookup).
Box 2: INCLUDE (LogID, LogDateTime, [log]) To optimize the query, the non-clustered index should include the persisted JSON property column in the index key for filtering, and the two columns returned by the report in the INCLUDE clause. This strategy enables an index seek and covers the query, avoiding costly key lookups.
Recommended Non-Clustered Index Structure: Index Key: The new computed column holding the persisted JSON property.
Included Columns: The two columns specified in the report's SELECT list.
Why this works: PERSISTED: Acts like a regular column, allowing direct indexing.
Covering Index: By including the result columns, the query engine retrieves all necessary data directly from the index leaf nodes, eliminating key lookups.
Efficiency: Prevents full table scans, reducing I/O and increasing query speed.


Reference:



Share your comments for Microsoft DP-800 exam with other users:

M
Mihai
7/19/2023 12:03:00 PM

i need the dumps !

W
Wafa
11/13/2023 3:06:00 AM

very helpful

A
Alokit
7/3/2023 2:13:00 PM

good source

S
Show-Stopper
7/27/2022 11:19:00 PM

my 3rd test and passed on first try. hats off to this brain dumps site.

M
Michelle
6/23/2023 4:06:00 AM

please upload it

L
Lele
11/20/2023 11:55:00 AM

does anybody know if are these real exam questions?

G
Girish Jain
10/9/2023 12:01:00 PM

are these questions similar to actual questions in the exam? because they seem to be too easy

P
Phil
12/8/2022 11:16:00 PM

i have a lot of experience but what comes in the exam is totally different from the practical day to day tasks. so i thought i would rather rely on these brain dumps rather failing the exam.

B
BV
6/8/2023 4:35:00 AM

good questions

K
krishna
12/19/2023 2:05:00 AM

valied exam dumps. they were very helpful and i got a pretty good score. i am very grateful for this service and exam questions

P
Pie
9/3/2023 4:56:00 AM

will it help?

L
Lucio
10/6/2023 1:45:00 PM

very useful to verify knowledge before exam

A
Ajay
5/17/2023 4:54:00 AM

good stuffs

T
TestPD1
8/10/2023 12:19:00 PM

question 17 : responses arent b and c ?

N
Nhlanhla
12/13/2023 5:26:00 AM

just passed the exam on my first try using these dumps.

R
Rizwan
1/6/2024 2:18:00 AM

very helpful

Y
Yady
5/24/2023 10:40:00 PM

these questions look good.

K
Kettie
10/12/2023 1:18:00 AM

this is very helpful content

S
SB
7/21/2023 3:18:00 AM

please provide the dumps

D
David
8/2/2023 8:20:00 AM

it is amazing

U
User
8/3/2023 3:32:00 AM

quesion 178 about "a banking system that predicts whether a loan will be repaid is an example of the" the answer is classification. not regresion, you should fix it.

Q
quen
7/26/2023 10:39:00 AM

please upload apache spark dumps

E
Erineo
11/2/2023 5:34:00 PM

q14 is b&c to reduce you will switch off mail for every single alert and you will switch on daily digest to get a mail once per day, you might even skip the empty digest mail but i see this as a part of the daily digest adjustment

P
Paul
10/21/2023 8:25:00 AM

i think it is good question

U
Unknown
8/15/2023 5:09:00 AM

good for students who wish to give certification.

C
Ch
11/20/2023 10:56:00 PM

is there a google drive link to the images? the links in questions are not working.

J
Joey
5/16/2023 5:25:00 AM

very promising, looks great, so much wow!

A
alaska
10/24/2023 5:48:00 AM

i scored 87% on the az-204 exam. thanks! i always trust

N
nnn
7/9/2023 11:09:00 PM

good need more

U
User-sfdc
12/29/2023 7:21:00 AM

sample questions seems good

T
Tamer dam
8/4/2023 10:21:00 AM

huawei is ok

Y
YK
12/11/2023 1:10:00 AM

good one nice

D
de
8/28/2023 2:38:00 AM

please continue

D
DMZ
6/25/2023 11:56:00 PM

this exam dumps just did the job. i donot want to ruffle your feathers but your exam dumps and mock test engine is amazing.

AI Tutor 👋 I’m here to help!