πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-800 Domain 2
Domain 2 β€” Module 11 of 11 100%
21 of 28 overall

DP-800 Study Guide

Domain 1: Design and Develop Database Solutions

  • Table Design: Columns, Types, and Indexes Free
  • Constraints: Protecting Your Data Free
  • Specialised Tables and Graph Queries Free
  • JSON in SQL: Store, Query, and Index
  • Programmability: Views, Functions, Procedures, and Triggers
  • Advanced T-SQL: CTEs, Windows, and Correlated Queries
  • Pattern Power: Regular Expressions in T-SQL
  • Fuzzy String Matching: Finding Similar Text
  • AI-Assisted SQL with GitHub Copilot Free
  • MCP: Connecting AI to Your Database

Domain 2: Secure, Optimize, and Deploy Database Solutions

  • Encryption: Always Encrypted and Column-Level
  • Dynamic Data Masking and Row-Level Security
  • Permissions, Auditing, and Passwordless Access
  • Transaction Isolation and Concurrency
  • Query Performance: Plans, DMVs, and Query Store
  • SQL Database Projects: Build and Validate
  • CI/CD Pipelines for SQL Databases
  • Data API Builder: REST and GraphQL from SQL
  • Securing AI and API Endpoints
  • Change Detection: CES, CDC, and Change Tracking
  • Azure Integration and Monitoring

Domain 3: Implement AI Capabilities in Database Solutions

  • External AI Models: Choose, Create, Manage
  • Embeddings: Design, Chunk, and Generate
  • Choose Your Search Strategy
  • Vector Data: Types, Indexes, and Storage
  • Vector Search: Distance, ANN, and ENN
  • Hybrid Search and Reciprocal Rank Fusion
  • RAG with SQL: Prompt, Process, Respond

DP-800 Study Guide

Domain 1: Design and Develop Database Solutions

  • Table Design: Columns, Types, and Indexes Free
  • Constraints: Protecting Your Data Free
  • Specialised Tables and Graph Queries Free
  • JSON in SQL: Store, Query, and Index
  • Programmability: Views, Functions, Procedures, and Triggers
  • Advanced T-SQL: CTEs, Windows, and Correlated Queries
  • Pattern Power: Regular Expressions in T-SQL
  • Fuzzy String Matching: Finding Similar Text
  • AI-Assisted SQL with GitHub Copilot Free
  • MCP: Connecting AI to Your Database

Domain 2: Secure, Optimize, and Deploy Database Solutions

  • Encryption: Always Encrypted and Column-Level
  • Dynamic Data Masking and Row-Level Security
  • Permissions, Auditing, and Passwordless Access
  • Transaction Isolation and Concurrency
  • Query Performance: Plans, DMVs, and Query Store
  • SQL Database Projects: Build and Validate
  • CI/CD Pipelines for SQL Databases
  • Data API Builder: REST and GraphQL from SQL
  • Securing AI and API Endpoints
  • Change Detection: CES, CDC, and Change Tracking
  • Azure Integration and Monitoring

Domain 3: Implement AI Capabilities in Database Solutions

  • External AI Models: Choose, Create, Manage
  • Embeddings: Design, Chunk, and Generate
  • Choose Your Search Strategy
  • Vector Data: Types, Indexes, and Storage
  • Vector Search: Distance, ANN, and ENN
  • Hybrid Search and Reciprocal Rank Fusion
  • RAG with SQL: Prompt, Process, Respond
Domain 2: Secure, Optimize, and Deploy Database Solutions Premium ⏱ ~13 min read

Azure Integration and Monitoring

Monitor SQL databases, DAB endpoints, and data pipelines with Azure Monitor, Application Insights, and Log Analytics β€” build dashboards, set alerts, and diagnose issues with KQL.

You cannot fix what you cannot see

β˜• Simple explanation

Think of a car dashboard.

Your car has a speedometer, fuel gauge, temperature warning light, and engine light. Without them, you would not know you are running out of fuel until the car stops. You would not know the engine is overheating until it catches fire.

Azure Monitor is the dashboard for your database. Metrics are the gauges (CPU usage, storage, connections). Alerts are the warning lights (email you when CPU hits 90 percent). Log Analytics is the mechanic’s diagnostic computer (deep dive into exactly what happened and when). Application Insights watches your application code β€” how fast are API calls, where are errors happening.

Azure Monitor is the unified observability platform for all Azure resources. For DP-800, you need to understand three pillars: Metrics (numeric time-series data β€” CPU, DTU, storage, connections), Logs (structured event data stored in Log Analytics workspaces, queried with KQL), and Application Insights (application performance monitoring for DAB, web apps, and APIs). The exam tests your ability to recommend the right monitoring configuration for different workload types and set up meaningful alerts.

Azure Monitor for SQL databases

Azure Monitor collects two types of data from SQL databases:

Metrics (the gauges)

Metrics are numeric values collected at regular intervals. They answer β€œhow is my database doing right now?”

MetricWhat It MeasuresAlert When
CPU percentageProcessor utilisationAbove 80% sustained
DTU/vCore percentageOverall resource consumptionAbove 90% sustained
Data IO percentageDisk read/write pressureAbove 85% sustained
Log IO percentageTransaction log write throughputAbove 80% sustained
Storage percentageDatabase size vs max sizeAbove 85% (prevent hitting the limit)
Connection failedAuthentication or connection errorsAny spike above baseline
DeadlocksDeadlock occurrencesAny count above zero
Sessions percentageActive sessions vs max allowedAbove 70%

Diagnostic settings

To send detailed logs to Log Analytics, configure diagnostic settings on the SQL database:

Azure SQL Database
  β†’ Diagnostic settings
    β†’ Add diagnostic setting
      β†’ Select categories:
        β˜‘ SQLInsights
        β˜‘ AutomaticTuning
        β˜‘ QueryStoreRuntimeStatistics
        β˜‘ QueryStoreWaitStatistics
        β˜‘ Errors
        β˜‘ DatabaseWaitStatistics
        β˜‘ Timeouts
        β˜‘ Blocks
        β˜‘ Deadlocks
      β†’ Send to: Log Analytics workspace

These categories stream detailed data into your Log Analytics workspace where you can query it with KQL.

Log Analytics and KQL

Log Analytics stores logs in tables that you query using Kusto Query Language (KQL). Think of it as SQL for logs.

Essential KQL queries for SQL monitoring

// Top 10 longest-running queries in the last 24 hours
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "QueryStoreRuntimeStatistics"
| where TimeGenerated > ago(24h)
| summarize AvgDuration = avg(duration_d) by query_hash_s
| top 10 by AvgDuration desc

// Connection failures over the past week
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "Errors"
| where TimeGenerated > ago(7d)
| summarize FailureCount = count() by bin(TimeGenerated, 1h), error_number_d
| render timechart

// Deadlock events with details
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "Deadlocks"
| project TimeGenerated, deadlock_xml_s
| order by TimeGenerated desc

KQL basics for the exam

KQL OperatorWhat It DoesSQL Equivalent
whereFilter rowsWHERE
summarizeAggregateGROUP BY with aggregate functions
projectSelect columnsSELECT specific columns
extendAdd calculated columnComputed column in SELECT
top N byLimit and sortTOP N … ORDER BY
bin()Time bucketingDATEPART grouping
ago()Relative timeDATEADD from GETDATE
renderVisualise resultsNo SQL equivalent (charting)
πŸ’‘ Exam tip: KQL is not SQL

KQL reads left-to-right with pipe operators. Do not confuse it with T-SQL:

  • KQL: AzureDiagnostics | where Category == "Errors" | summarize count() by error_number_d
  • SQL: SELECT error_number, COUNT(*) FROM AzureDiagnostics WHERE Category = 'Errors' GROUP BY error_number

The exam may show KQL snippets and ask what they return. Focus on the pipe flow: data starts on the left, each pipe transforms it, and the final result comes out the right side.

Application Insights for DAB

Application Insights monitors the application layer β€” your Data API Builder endpoints, web applications, and API gateways. While Azure Monitor for SQL watches the database engine, Application Insights watches the code that talks to it.

What Application Insights captures

SignalExample
Request rates500 REST requests per minute to /api/products
Response timesAverage 45ms, P95 at 200ms
Failure rates2% of requests returning 500 errors
DependenciesCalls from DAB to SQL taking 120ms average
ExceptionsStack traces when requests fail
Custom eventsBusiness-specific telemetry you add to code

Instrumenting DAB

DAB supports Application Insights through configuration:

"runtime": {
  "telemetry": {
    "application-insights": {
      "connection-string": "@env('APPLICATIONINSIGHTS_CONNECTION_STRING')",
      "enabled": true
    }
  }
}

With this enabled, every REST and GraphQL request is tracked β€” response time, status code, and SQL dependency calls. You can correlate a slow API response directly to the underlying SQL query.

The application map

Application Insights generates an application map showing how your components connect:

Browser/Mobile App
        ↓
   Data API Builder (DAB)
    ↓           ↓
Azure SQL    Azure OpenAI

Each node shows request rates, response times, and failure rates. Red nodes indicate problems. You can click any connection to drill into specific slow or failing requests.

πŸ’‘ Scenario: Leo diagnoses slow search at SearchWave

Users report that the SearchWave product search is slow during peak hours. Leo opens Application Insights:

  1. Application map shows DAB-to-SQL dependency has P95 latency of 3 seconds (normally 50ms)
  2. Drills into the dependency β†’ it is the usp_SearchProducts stored procedure
  3. Checks Log Analytics for the SQL database β†’ CPU is at 95% during peak hours
  4. Cross-references with Query Store β†’ the search procedure’s execution plan regressed after a statistics update

The fix: force the good plan in Query Store and scale up the SQL database tier during peak hours. Leo found the root cause in minutes because all three monitoring layers (Application Insights, Azure Monitor metrics, Log Analytics with Query Store data) connected the dots.

Monitoring recommendations by workload

Monitoring recommendations by workload type
Workload TypeKey Metrics to WatchAlert ThresholdsTools
OLTP (transactional)DTU/vCore %, deadlocks, connection failures, response timeCPU above 80%, any deadlocks, response P95 above 200msAzure Monitor metrics + Application Insights
Analytics / reportingQuery duration, data IO %, tempdb usage, concurrent queriesQuery duration above 5 min, data IO above 90%Log Analytics with Query Store data
DAB API layerRequest rate, response time, failure rate, dependency latencyFailure rate above 1%, P95 above 500msApplication Insights with dependency tracking
CDC / CES pipelinesCDC latency, Event Hubs throughput, backlog sizeCDC scan latency above 5 min, consumer lag growingAzure Monitor for Event Hubs + SQL diagnostic logs

Alert rules

Alerts notify your team before users notice problems. Configure them in Azure Monitor:

Metric alert example

Alert rule: High CPU on VaultBank production database
  Condition: CPU percentage > 85% for 10 minutes
  Severity: Warning (Sev 2)
  Action group:
    β†’ Send email to dba-team@vaultbank.com
    β†’ Send Teams notification to #database-alerts
    β†’ Create incident in ServiceNow (webhook)

Log alert example (KQL-based)

// Alert when deadlocks exceed 5 in 15 minutes
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SQL"
| where Category == "Deadlocks"
| where TimeGenerated > ago(15m)
| summarize DeadlockCount = count()
| where DeadlockCount > 5

Smart detection

Application Insights includes smart detection that automatically identifies:

  • Sudden spikes in failure rates
  • Abnormal response time increases
  • Memory leak patterns
  • Dependency call degradation

No manual alert configuration needed β€” it learns your baseline and alerts on anomalies.

πŸ’‘ Exam tip: Metric alerts vs Log alerts

The exam may ask you to choose between metric alerts and log alerts:

  • Metric alerts β€” evaluate numeric time-series data at regular intervals (every 1-5 minutes). Fast to fire, low latency. Use for CPU, DTU, connection counts.
  • Log alerts β€” run a KQL query on a schedule. More flexible (any data in Log Analytics) but higher latency (5-15 minute minimum). Use for complex conditions like β€œmore than 5 deadlocks involving the Orders table in 15 minutes.”

When the question describes a simple threshold (CPU above 80%), use metric alerts. When it describes a complex condition requiring query logic, use log alerts.

Bringing it all together

A complete monitoring setup for a DAB-backed SQL application:

LayerToolWhat You See
User experienceApplication Insights (browser SDK)Page load time, client errors, user flows
API layerApplication Insights (DAB telemetry)Request rate, response time, failures
Database engineAzure Monitor metricsCPU, DTU, IO, connections, deadlocks
Query performanceLog Analytics with Query StoreSlow queries, plan regressions, wait stats
Change pipelinesAzure Monitor for Event HubsCES throughput, consumer lag, errors
AlertsAzure Monitor alert rulesProactive notification before user impact
Question

What is the difference between Azure Monitor metrics and Log Analytics?

Click or press Enter to reveal answer

Answer

Metrics are numeric time-series data collected at fixed intervals (CPU %, DTU %, connections). They are fast to query and ideal for dashboards and threshold alerts. Log Analytics stores detailed structured event data (query text, deadlock XML, error details) queried with KQL. Logs are richer but have higher query latency.

Click to flip back

Question

What does Application Insights monitor that Azure Monitor for SQL does not?

Click or press Enter to reveal answer

Answer

Application Insights monitors the application layer β€” HTTP request rates, response times, failure rates, dependency calls (how long SQL queries take from the app's perspective), and exceptions. Azure Monitor for SQL watches the database engine internals (CPU, IO, wait stats). Together they give end-to-end visibility.

Click to flip back

Question

What is KQL and how does it differ from T-SQL?

Click or press Enter to reveal answer

Answer

KQL (Kusto Query Language) is used to query Log Analytics and Azure Data Explorer. It reads left-to-right with pipe operators: source table, pipe, filter, pipe, aggregate, pipe, sort. T-SQL reads inside-out: SELECT, FROM, WHERE, GROUP BY. KQL is optimised for log analytics and time-series data, not transactional operations.

Click to flip back

Knowledge Check

Leo at SearchWave notices that the product API response time has doubled this week. Application Insights shows the DAB-to-SQL dependency is the bottleneck. What should Leo check next to find the root cause?

Knowledge Check

Ingrid at Nordic Shield needs to be alerted immediately when deadlocks occur on the Claims database. She needs the deadlock graph XML for diagnosis. Which alert type should she configure?

🎬 Video coming soon

Next up: External AI Models and SQL Server 2025 AI Features β€” call AI models from T-SQL, vector search, and intelligent query processing (Domain 3).

← Previous

Change Detection: CES, CDC, and Change Tracking

Next β†’

External AI Models: Choose, Create, Manage

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.