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

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.

What should you insert at line 05?

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());

Vou 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?

A.

Apply STRING_ESCAPE(MessageText, " json’ > before calling REGEXP_SUBSTR.

B.

Cast Messagelext to nvarchar(4000) before calling REGEXP SUBSIR.

C.

Add a collate Lati1_General_CS_AS clause to MessageText before calling regexp_SUBSTR.

D.

Run TRV_CONVERT(varchar(Bax), MessageText) before calling REGEXP_SUBSTR.

You have an Azure SQL database named DB1 that contains two tables named knowledgebase and query_cache. knowledge_base contains support articles and embeddings. query_cache contains chat questions, responses, and embeddings DB1 supports an Al-enabled chat agent.

You need to design a solution that meets the following requirements:

• Serializes the retrieved rows from knowledee_base

• Extracts the answer field from the response

• Extracts the embeddings to store in query_cache

You will call the external large language model (LLM) by using the sp_irwoke_external_re standpoint stored procedure.

Which Transact-SGL commands should you use for each requirement? To answer, drag the appropriate commands to the correct requirements. Each command may be used once, mote 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.

You have an Azure SQL database that contains a table named knowledgebase, knowledgebase stores human resources (HR) policy documents and contains columns named title, content, category, and embedding.

You have an application named App1. App1 queries two relational tables named employee_pnofiles and benefits_enrollnent that contain HR data. App1 hosts a chatbot that calls a large language model (LLM) directly.

Users report that the chatbot answers general HR questions correctly but provides outdated or incorrect answers when policies change. The chatbot also fails to answer questions that reference internal policy documents by title or category.

You need to recommend a Retrieval Augmented Generation (RAG) solution to resolve the chatbot issues. What should you recommend? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

You have an Azure SQL database that contains a table named dbo.ManualChunks. dbo.HonualChunks contains product manuals

A retrieval query already returns the top five matching chunks as nvarchar(max) text.

You need to call an Azure OpenAI REST endpomt for chat completions. The request body must include both the user question and theretiieved chunks.

You write the following Transact-SQL code.

What should you insert at line 22?

A.

FOR XHL AUTO, TYPE, XML SCHEMA,

B.

FOR 3SON AUTO, IMCLUDE_MULL_VAIUES

C.

FOR XHL PATH, INCLUDE_NULL_VAIUES

D.

FOR JSON PATH, WITHOUT_ARRAY_WRAPPER

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.

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

You have an Azure SQL database that supports the OLTP workload of an order-processing application.

During a 10-minute incident window, you run a dynamic management view query and discover the following:

Session 72 is sleeping with open_transaction_count = 1.

Multiple other sessions show blocking_session_id = 72 in sys.dm_exec_requests.

sys.dm_exec_input_buffer(72, NULL) returns only BEGIN TRANSACTION UPDATE Sales.Orders.

Users report that updates to Sales.Orders intermittently time out during the incident window. The timeouts stop only after you manually terminate session 72.

What is a possible cause of the blocking?

A.

A long-running SELECT statement is blocking writers.

B.

Session 72 caused a deadlock.

C.

An explicit transaction was started but not committed or rolled back.

D.

A lock escalation occurred.

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 nvarehar(iMx) column named log that stores JSON documents

You have a daily report that filters by the $.severity JSON property and returns Logld. 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.

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.