troubleshooting
807 TopicsBuild faster, trusted remote support with Diagnostic Data Reports in Remote Help
By: Kara Wang | Product Manager 2, Microsoft Intune & Ingrid Allen | Senior Product Manager, Windows Support sessions are most effective when your helpdesk team can quickly start with the right device context. In many cases, helpdesk staff still need to confirm key system details with the user before moving into targeted troubleshooting. In attended Windows support sessions, Diagnostic Data Reports in Remote Help for Windows is now available to help quickly onboard helpdesk staff with device information while maintaining user trust. In this context, attended sessions are sessions where the user participates and grants helpdesk staff access. These sessions support view only access, full control, and optional User Account Control (UAC) elevation. This capability is currently not available for Windows Remote Help unattended sessions. With this feature, your helpdesk team can request diagnostic data directly in the Remote Help session and generate a Diagnostic Data Report to guide troubleshooting. If updated information is needed, the helpdesk staff can refresh the report during the session. The user decides whether to allow sharing, can view what is shared, and can stop sharing at any time. Helpdesk staff receive practical context for faster, more informed troubleshooting, and the user keeps clear control. pdesk staff. Why this matters for your support operations When your team starts with structured diagnostic context, helpdesk staff spend less time on discovery and more time on resolution. That improves first pass troubleshooting and reduces repeat clarifying questions. You also keep the consent model transparent: The user explicitly allows or declines sharing. The user can see the shared data. The user can stop sharing during the session. This balance helps you improve support speed while maintaining confidence in your remote support process. How Diagnostic Data Reports work in Remote Help For attended Windows device sessions, the helpdesk staff requests diagnostic data collection by selecting the icon in the Remote Help toolbar. The user sees a request asking permission for the helpdesk staff to view and possibly store their device diagnostic data. The user chooses Allow or Decline. Device user consent prompt for diagnostic data sharing. If the user selects Allow: The helpdesk staff sees a report with collapsible sections with options to Refresh, Copy, and Collapse All. A View Shared Data button appears on the user’s toolbar. When the user selects View Shared Data, the diagnostic panel appears in the Remote Help app. The same diagnostic data report is shown to the helpdesk staff and the user. If the user selects Decline, helpdesk staff is notified. If the user initially allows the report to be generated and later chooses to turn sharing off, helpdesk staff is notified that the user stopped sharing data. Demo What data categories are shared, and how should you use them? When the user allows sharing, the report organizes data into practical categories. These categories help your helpdesk staff move from collecting context to resolving issues. Category Example data Admin/helpdesk value Device overview OS edition, build and architecture; device model and manufacturer; whether the device is a virtual machine; display language and system locale; kiosk mode. Confirms baseline environment and quickly rules out mismatched device context. Hardware Processor, cores and logical processors; installed memory; disk capacity; neural processing unit (NPU), when reported. Validates whether hardware limits are contributing to the issue. Network Maximum speed, link speed, and current send and receive rates. Helps detect low throughput and unstable connectivity conditions. GPU Graphics adapter, GPU usage, and dedicated, shared and available GPU memory. Supports graphics, rendering, and display troubleshooting. Performance Processor time, memory usage, page file, disk activity, network usage, and uptime. Identifies current system pressure and likely bottlenecks. Battery Whether a battery is present, charge level and status, battery health, and design versus full charge capacity. Useful for mobile device behavior and power-related incidents. Security Antivirus product, whether it's active and its definition status; firewall status for domain, private and public networks; TLS inspection detection. Surfaces security controls that may affect app or network behavior. Updates Windows Update channel, target release version, last check and install dates, counts of pending and failed updates, last restart time, and whether a restart is pending. Highlights update gaps or pending restart dependencies. Storage For each disk: model, bus and media type, capacity, free space, percentage used, drive letters, boot or system disk, and health status. Helps isolate disk health and capacity-related failures. Network interfaces For each network adapter: type, description, status, speed, whether DHCP is enabled, and whether the adapter is virtual. Speeds diagnosis of adapter configuration and connectivity issues. Devices Name and status of cameras, audio devices, displays, printers, keyboards, mice, Bluetooth devices and network adapters. Validates peripheral availability and health for user-facing issues. What to expect from the report during troubleshooting Diagnostic Data Reports give your helpdesk staff a reliable snapshot of device state to guide each troubleshooting step. Diagnostic values are captured as a point in time snapshot. Metrics like memory, CPU, and network activity reflect device state at collection time. After a change, the helpdesk staff can refresh to collect a current snapshot and validate whether remediation changed the device’s state. If a field is missing, this means that the device did not report that value. It does not mean healthy, false, or zero by default. This gives your helpdesk staff a clearer context for decision making and helps keep troubleshooting steps grounded in current, observable device data. User control and session behavior Users can inspect what was shared by selecting View Shared Data after they allow sharing. This helps maintain transparency during the session. If sharing is turned off, previously collected information remains visible for reference, but refreshing data is unavailable until sharing is turned back on. If the user resumes sharing, the helpdesk staff can refresh to collect a current snapshot. This model lets you keep troubleshooting continuity while respecting user control. Real-world support example: Screen share lag despite healthy network A user reports choppy screen sharing and delayed remote control, even though their connection appears healthy. The helpdesk staff can spend time validating connectivity with separate checks and still struggle to determine whether the issue is network congestion or endpoint resource contention. With Diagnostic Data Reports in Remote Help, the helpdesk staff requests the report and reviews Network, Performance, and GPU together in real time. The helpdesk staff confirms stable link speed and normal send and receive throughput but also sees elevated CPU and GPU pressure during the session. This indicates an endpoint bottleneck rather than a bandwidth problem. The helpdesk staff guides the user to close high impact apps and reduce display and graphics load, then refreshes the report to confirm improved responsiveness. The result is faster confirmation of whether lag is network related or endpoint related, fewer unnecessary escalations to network teams, and quicker in session recovery with immediate validation after each fix. Next steps Diagnostic Data Reports are rolling out now and expected to be available to all Intune customers by mid-December, so give them a try in your next Windows attended session and see how much time they save you. We'd love to hear how it goes. If you have feedback or questions, drop us a note in the comments below! Learn more Remote Help documentation: https://aka.ms/remotehelpdocs Microsoft 365 Roadmap: https://www.microsoft.com/microsoft-365/roadmap Stay up to date! Bookmark the Microsoft Intune Blog and Intune Customer Success Blog and follow us on LinkedIn or @MSIntune and @IntuneSuppTeam on X to continue the conversation.663Views0likes3CommentsWhere Can I Privately Submit a Personal Letter of Appreciation to Microsoft?
I am a lifelong Microsoft user who has written a meaningful, seven-page personal letter expressing my sincere appreciation for Microsoft's impact on my life, education, accessibility, and creative development. The letter also includes a suggestion for future AI collaboration. Because the letter contains personal experiences, I would prefer to submit it privately rather than share it on a public forum. Could someone please direct me to an appropriate email address, department, or official submission channel where I can send my complete letter as a PDF attachment? I am not seeking employment, compensation, or a partnership. My intention is simply to express my gratitude and share a thoughtful suggestion with the Microsoft team. Thank you for your guidance.31Views0likes0CommentsCopilot is missing in Outlook Desktop
I have an active Microsoft 365 Personal subscription associated with my Microsoft account. Copilot is available and working in: Word/Excel Desktop Word/Excel on the web Outlook on the web However, Copilot is not appearing in either Classic Outlook or New Outlook for Windows. In New Outlook, I see prompts such as "Get Copilot" or "Buy Copilot" as though no entitlement is assigned. Environment: Windows 11 Microsoft 365 Personal Outlook Version 2611 (Build 16.0.20625.20102) 64-bit Troubleshooting already completed: Verified subscription is active Verified Outlook and Office are fully updated Used "Update License" Confirmed Outlook is signed in with the same Microsoft account that owns the subscription Confirmed Copilot works in desktop Word and web apps I was able to use Copilot in Outlook previously on this same device, but after not using the laptop for a couple of weeks, the Copilot functionality is no longer available in Outlook. Has anyone else experienced this, or is there a known issue affecting Copilot recognition specifically in Outlook Desktop?26Views0likes0CommentsAzure SQL Query Editor Won't Connect? Start Here
The Azure portal loads fine, you open Query Editor, and then you get "failed to fetch" or a vague connection error. It's tempting to assume the database is down, or to look for "the Query Editor IP" to add to your firewall. Usually, it's neither. Query Editor runs in your browser, so the problem can start on your laptop, your corporate proxy, the SQL firewall, your sign-in, or the database itself. The quickest fix is to work out which of those layers is failing before you change any server rules. How Query Editor actually connects There's no single Microsoft source IP to allowlist. For public connections to the query editor, you need to add your outbound IP address to the server's allowed firewall rules to access your databases. The IP that matters are the one your network presents to the internet, not an Azure address. Private Link changes this. You don't need to add your IP address to the SQL server firewall rules if you have a Private Link connection set up on the server, and you connect to the server from within the private virtual network. In that case, focus on DNS and whether you're really inside the right network. Check port 443 first Starting in March 2026, the Azure SQL query editor uses only TCP port 443. If something on your network blocks that traffic, you'll see messages about local network settings or proxy configuration. A quick test from PowerShell: Test-NetConnection <server-name>.database.windows.net -Port 443 If TcpTestSucceeded is False, the problem is on the client or network side. Keep in mind that opening 443 locally doesn't replace the SQL server firewall or Private Link setup. You still need both. Proxies and TLS inspection Corporate proxies cause more of these failures than people expect. If you see an error about the X-CSRF-Signature header, verify that your computer's clock is set to the right time and time zone, and if you're behind a proxy, make sure that the request header X-CSRF-Signature isn't being modified or dropped. A simple check: try Query Editor from a clean network, such as a phone hotspot. If it works there but not on the corporate network, talk to your network team, not the database team. Authentication and database users Being signed in to the portal doesn't give you access to the database. For Microsoft Entra sign-in, your database must be configured with Microsoft Entra authentication, and you must have a Microsoft Entra user created in the database. If you see "The server is not currently configured to accept this token," the fix is usually a contained user: CREATE USER [user@contoso.com] FROM EXTERNAL PROVIDER; Serverless databases that are paused On serverless databases, the "not currently available" message often just means your serverless database is currently paused. Selecting Continue starts the resume. Wait approximately one minute, refresh the page, and try again. Know the tool's limits Query Editor is built for quick queries, not everything. The query editor has a five-minute timeout for query execution. Also, the query editor doesn't support connecting to the logical server's master database. For either of those cases, use SSMS or VS Code with the MSSQL extension. Trying SSMS from the same machine is also a good diagnostic, because it shows whether the issue is with the browser path or with general connectivity. Symptom to layer: a quick reference What you see Likely layer First thing to try "Failed to fetch" / local network settings message Browser or client network Test-NetConnection on port 443 Works on hotspot, fails on corporate network Proxy / TLS inspection Ask network team to check header handling X-CSRF-Signature error Clock or proxy Fix system time, check proxy Firewall / client IP not allowed error SQL server firewall Add your current outbound IP only Fails from outside VNet with Private Link Private networking Check DNS resolves to the private endpoint "Not configured to accept this token" Authentication Create the contained Entra user "Database not currently available" Serverless pause Wait about a minute and retry One last word on firewall rules Please don't open wide IP ranges just to get Query Editor working. Add the specific outbound IP you need, remove it when you're done, and use Private Link for anything that needs ongoing access. Most Query Editor failures turn out to be network or identity issues, not database problems. Find the layer first and the fix is usually small. Reference: Azure Portal Query Editor - Azure SQL Database | Microsoft Learn128Views0likes0CommentsA Practical RCA Method for Azure SQL: Separating Evidence, Correlation and Root Cause
CPU hit 100%. You scaled the database. The problem went away. You still haven't proved that CPU was the root cause. We see RCAs written this way all the time, and it's easy to understand why. There's pressure to explain what happened, and a clear story feels better than an open question. But an RCA built on correlation can send a team in the wrong direction. You end up paying for capacity you don't need while the real cause waits for the next incident. Here's the method we use to keep evidence, correlation and conclusions apart. What an RCA should answer A useful RCA answers four questions: What happened? Symptoms and impact, with exact times. Why did it happen? The cause, backed by evidence. What stopped it? The mitigation. What are we still unsure about? The limits of the evidence. Most weak RCAs answer the first and third questions well and then treat the third as if it were the second. The framework Observation → Correlation → Hypothesis → Validation → Conclusion Step What it means Example Observation Something you measured directly "CPU reached 95% at 09:00 UTC" Correlation Two observations happened close together "Login failures started two minutes later" Hypothesis A possible explanation you can test "High CPU caused the failover" Validation Evidence that supports or rules out the hypothesis "Comparable CPU peaks last week caused no failover" Conclusion What the validated evidence allows you to say "CPU is not established as the cause" The step that gets skipped most often is validation, and it's the one that matters most. A worked example (synthetic) Here's an invented incident on a fictional database, SalesDB: 09:00 UTC CPU rises to 95% 09:02 UTC Login failures begin (error 40613) 09:04 UTC Database fails over to another replica 09:05 UTC Connections recover The first draft of the RCA practically writes itself: "High CPU caused the failover." Before you accept that, ask: Did CPU actually reach the limit? 95% is high, but it isn't exhaustion. Were worker or session limits reached? Check max_worker_percent and max_session_percent in sys.dm_db_resource_stats. Was memory under pressure? Was the failover triggered independently? For example, by planned maintenance. Check Resource Health and Service Health. What happened during earlier high-CPU periods? If CPU reached 95% three times last week with no failover, CPU alone doesn't explain this one. Did other databases on similar workloads see the same thing? Now classify every statement: Statement Classification CPU reached 95% Confirmed Login failures occurred Confirmed The events overlapped in time Confirmed CPU caused the failover Unconfirmed hypothesis The failover restored connectivity Confirmed The failover proves the old replica was faulty Not established That table is more honest than the first draft, and more useful too. It shows the reader exactly what's known and what still needs work. Habits that make RCAs better Use UTC everywhere. Mixed time zones are the most common reason two sets of logs "don't line up." Convert everything before you compare anything. Define the impact first. Who was affected, how badly, and for how long? "Some logins failed between 09:02 and 09:05" is far more useful than "the database was down." Keep observations and interpretation apart. "Error 40613 was returned" is an observation. "The database was unavailable because of load" is an interpretation. Write them in separate places. Consider more than one explanation. If you only have one hypothesis, you'll find evidence for it. Write down at least two, then look for evidence that would rule each one out. Compare against healthy periods. A metric only means something next to its baseline. High CPU during an incident matters less if CPU is just as high every Monday morning. Compare against unaffected resources. If two databases had the same load and only one failed, load probably isn't the whole story. Don't assume the fix explains the cause. Restarts, failovers and scale operations change many things at once: the compute node, connections, caches and sometimes the physical host. When the problem stops after one of them, you know something in that bundle mattered. You don't know which part. When "root cause unknown" is the right answer Sometimes the evidence doesn't support a definite cause. Saying so isn't failure. It's accuracy. A good RCA with an open cause still gives the reader something to act on: What was ruled out, and how. Which hypotheses remain, ranked by likelihood. What evidence would settle it next time, such as finer-grained monitoring, connection-level logging or a synthetic probe. What resilience work reduces the impact whatever the cause turns out to be, such as retry logic or alerting. A simple RCA template 1. Summary – One paragraph: what happened, the impact, the current status 2. Impact – Who/what was affected, start and end times in UTC 3. Timeline – Observations only, in UTC 4. Analysis – Hypotheses considered, evidence for and against each 5. Root cause – What the evidence supports (or "not established") 6. Mitigation – What restored service 7. Limitations – What the evidence could not show 8. Next actions – Prevention, detection, and evidence gaps to close Summary A good RCA tells you what the evidence shows, and also what it doesn't let you claim. "We restarted it and the problem went away" describes a mitigation, not automatically a root cause. Keep those two apart, and your RCAs become something people can trust and act on.132Views0likes0CommentsWhen SQL Performance Changes Without a Code Change: Read the Actual Execution Plan Before Tuning
Your query returns 800 rows, but the engine processed 108,000 to get there. That gap may be the whole performance problem. "This query used to be fast, and nobody changed it" is one of the most common things we hear in performance cases. Often the first reaction is to update statistics, add an index or scale up. Those can help, but they're guesses. A better first question is: Which operator produced far more rows than expected, and why? The actual execution plan answers that question. Why the same SQL can slow down Leaving the code untouched doesn't keep everything else the same. Common reasons a query slows down on its own: Data growth: a history table that doubles in size makes every join against it more expensive. A different plan: new statistics, a recompile or a parameter value can lead the optimizer to choose a different shape. Changes in data distribution: for example, more versions per key than before. The query text is the same, but what the engine actually does may not be. Estimated vs. actual plans An estimated plan is what the optimizer expects to happen. An actual plan shows what did happen, including the real row count at every operator. To capture one: In SSMS: select Include Actual Execution Plan (Ctrl+M) before you run the query. In T-SQL: run SET STATISTICS XML ON before the query. For the last actual plan of a cached query: turn on LAST_QUERY_PLAN_STATS and query sys.dm_exec_query_plan_stats. Both are supported in Azure SQL. Once you have the plan, read it from right to left. On each operator, compare Estimated Number of Rows with Actual Number of Rows. The first place where the two numbers diverge sharply is usually where to start. A small example that gets expensive Here's a common pattern: a table with one current row per entity, joined to two history tables before any filtering. CREATE TABLE dbo.Entity (EntityId int PRIMARY KEY, Status varchar(10)); CREATE TABLE dbo.PriceHistory (EntityId int, ValidFrom date, Price decimal(10,2)); CREATE TABLE dbo.RegionHistory (EntityId int, ValidFrom date, Region varchar(10)); -- 1,000 entities, 800 of them Active INSERT dbo.Entity SELECT value, CASE WHEN value % 5 = 0 THEN 'Closed' ELSE 'Active' END FROM GENERATE_SERIES(1, 1000); -- 18 price versions per entity INSERT dbo.PriceHistory SELECT e.EntityId, DATEADD(MONTH, v.value, '2024-01-01'), 100 + v.value FROM dbo.Entity AS e CROSS JOIN GENERATE_SERIES(1, 18) AS v; -- 6 region versions per entity INSERT dbo.RegionHistory SELECT e.EntityId, DATEADD(MONTH, v.value * 3, '2024-01-01'), CONCAT('R', v.value) FROM dbo.Entity AS e CROSS JOIN GENERATE_SERIES(1, 6) AS v; This query looks harmless: WITH joined AS ( SELECT e.EntityId, e.Status, p.ValidFrom AS PriceFrom, p.Price, r.ValidFrom AS RegionFrom, r.Region FROM dbo.Entity AS e JOIN dbo.PriceHistory AS p ON p.EntityId = e.EntityId JOIN dbo.RegionHistory AS r ON r.EntityId = e.EntityId ), windowed AS ( SELECT *, LAG(Price) OVER (PARTITION BY EntityId ORDER BY PriceFrom) AS PrevPrice, ROW_NUMBER() OVER (PARTITION BY EntityId ORDER BY PriceFrom DESC, RegionFrom DESC) AS rn FROM joined ) SELECT EntityId, Price, PrevPrice, Region FROM windowed WHERE Status = 'Active' AND rn = 1; It returns 800 rows. Here's what happens along the way: 1,000 entities ↓ join price history (18 versions each) 18,000 rows ↓ join region history (6 versions each) 108,000 rows ↓ LAG + ROW_NUMBER → sort 108,000 rows sorted ↓ filter: Status = 'Active' AND rn = 1 800 rows The engine builds and sorts 135 rows for every row you get back. Because Status isn't a partitioning column of the window functions, the filter on it can't be applied before them. The engine has to compute every window first and filter afterwards. Count at every stage The quickest way to see where rows multiply is to count them stage by stage: SELECT COUNT(*) AS rows_, COUNT(DISTINCT e.EntityId) AS entities FROM dbo.Entity AS e; -- 1,000 | 1,000 SELECT COUNT(*), COUNT(DISTINCT e.EntityId) FROM dbo.Entity AS e JOIN dbo.PriceHistory AS p ON p.EntityId = e.EntityId; -- 18,000 | 1,000 SELECT COUNT(*), COUNT(DISTINCT e.EntityId) FROM dbo.Entity AS e JOIN dbo.PriceHistory AS p ON p.EntityId = e.EntityId JOIN dbo.RegionHistory AS r ON r.EntityId = e.EntityId; -- 108,000 | 1,000 When COUNT(*) grows but COUNT(DISTINCT key) stays the same, the join is multiplying rows rather than adding new information. That's a many-to-many join between history tables. Check correctness before you tune That join multiplication can also change the results, not just the cost. After the second join, every price version appears 6 times. LAG(Price) is meant to return the previous price, but it can now return a duplicate of the same price. The query runs, returns the expected number of rows, and some of the values may be wrong. In a real case we worked on, duplicate history rows were identified as something that could affect previous-value logic like this. It was a hypothesis to test against the business rules, not a confirmed defect. Treat it the same way in your environment: confirm what the result should be before you make it faster. A better shape Reduce each history table to only what you need, then join: WITH p AS ( SELECT EntityId, Price, LAG(Price) OVER (PARTITION BY EntityId ORDER BY ValidFrom) AS PrevPrice, ROW_NUMBER() OVER (PARTITION BY EntityId ORDER BY ValidFrom DESC) AS rn FROM dbo.PriceHistory ), r AS ( SELECT EntityId, Region, ROW_NUMBER() OVER (PARTITION BY EntityId ORDER BY ValidFrom DESC) AS rn FROM dbo.RegionHistory ) SELECT e.EntityId, p.Price, p.PrevPrice, r.Region FROM dbo.Entity AS e JOIN p ON p.EntityId = e.EntityId AND p.rn = 1 JOIN r ON r.EntityId = e.EntityId AND r.rn = 1 WHERE e.Status = 'Active'; The window functions now each run over a single history table, so LAG sees each price version once. The joins then combine one row per entity instead of multiplying versions. Compare the actual plans of the two queries side by side, and check that the results match what the business expects. Other things to look for in the actual plan Sort and hash warnings. A yellow warning icon on an operator can mean it spilled to tempdb because its memory grant was too small for the real row count. Memory grant. Check the root operator's properties. A grant sized for 1,000 rows can't handle 108,000. Late filters. A filter near the left of the plan (close to the end of processing) that removes most rows means the work to its right was mostly wasted. Statistics. Use them as evidence. If estimated and actual row counts are far apart on a table scan or seek, outdated statistics may be the cause. If the estimates are accurate there but wrong after a join, updating statistics again usually won't help. Checklist Capture the actual plan, not only the estimated one. Find the first operator where estimated and actual rows diverge sharply. Count rows and distinct keys at each join. Look for many-to-many joins between history tables. Check whether filters run before or after expensive sorts and window functions. Look for spills and undersized memory grants. Confirm the results are correct before you optimize. Test changes on a smaller copy of the data, then confirm the improvement at full size. Summary The most expensive rows in a query are often the ones your application never receives. Before you update statistics again or add another index, find out how many rows each step actually produced. The actual execution plan already shows that.133Views0likes0CommentsAzure SQL Hyperscale Looks Healthy, but Logins Are Failing: Troubleshooting Partial Availability
Can an Azure SQL database look healthy while your users can't log in? Yes. It happens when the health signals and your application are measuring different things. We see this question in support cases fairly often: "Availability looked fine, so why couldn't my application connect?" This post explains why the two can disagree, especially on Hyperscale, and how to collect the evidence that shows what really happened. A quick look at Hyperscale Hyperscale separates compute from storage. At a high level: Compute replicas run your queries. These are the primary, plus any high-availability (HA) and named replicas. Each one keeps a local cache of hot data. Page servers store the data and serve pages the compute replica doesn't have cached. The log service receives the transaction log and passes changes on to the other components. This design is what makes Hyperscale scale so well. It also means "the database" is several components working together, and they don't all fail together. The Hyperscale architecture overview covers this in more detail. "Available" isn't one thing These are four questions that sound similar but aren't: Signal What it really tells you Service or resource availability The database is online at the platform level Primary replica health The compute node serving your writes is working normally Login success rate New connections are actually completing Query latency Work is finishing in a reasonable time once connected Storage can be healthy while the compute replica is struggling. The database can be online while some logins fail. And a health check can succeed between two failed attempts. Healthy storage + degraded compute ≠ healthy application experience. A real-world pattern In a recent Hyperscale case, the customer saw intermittent login failures and slow reads from remote storage on the primary replica. The storage components themselves looked healthy. The database was never fully down, and some health checks kept succeeding while the application had trouble connecting. Customer impact ended after a failover moved the workload to a different, healthy replica. However, the exact underlying cause on the original replica wasn't confirmed. The failover fixed the symptoms, and that tells you the problem was tied to that specific replica. It doesn't tell you why. Recovering service and finding the root cause are separate results, and an RCA should make clear which of the two it reached. Why averages hide the problem Most dashboards show data averaged over 1 minute, 5 minutes or 1 hour. A short burst of failures disappears in those averages. Suppose a probe connects every 5 seconds, and 6 attempts fail in a 30-second burst: View Probes Failures Success rate The 5-minute window containing the burst 60 6 90.0% The full hour 720 6 99.2% Your users felt a real outage. The hourly chart looks almost perfect. Measure what your users experience Platform metrics are useful but run your own lightweight probe from where your application runs. Here's a simple Python example: import time, csv, datetime, pyodbc CONN = ("Driver={ODBC Driver 18 for SQL Server};" "Server=tcp:<server>.database.windows.net,1433;" "Database=<db>;Encrypt=yes;Authentication=ActiveDirectoryMsi;") REGION = "<app-region>" with open("sql_probe.csv", "a", newline="") as f: w = csv.writer(f) while True: ts = datetime.datetime.now(datetime.timezone.utc).isoformat() login_ms = query_ms = None ok, err = False, "" try: t0 = time.perf_counter() conn = pyodbc.connect(CONN, timeout=15) login_ms = round((time.perf_counter() - t0) * 1000) t1 = time.perf_counter() conn.cursor().execute("SELECT 1").fetchone() query_ms = round((time.perf_counter() - t1) * 1000) conn.close() ok = True except pyodbc.Error as e: err = str(e)[:200] w.writerow([ts, ok, login_ms, query_ms, err, REGION]) f.flush() time.sleep(5) Each row records: The UTC timestamp Whether the connection succeeded Login time Time for a simple query The SQL error, if any The region the probe ran from Keep the raw rows rather than only averages. If login time rises before failures begin, that's often the earliest warning you'll get. Lining up the evidence When something goes wrong, put these side by side in UTC: Application errors, with error numbers and connection IDs Your probe results Resource Health and Service Health events Database performance data, such as sys.dm_db_resource_stats and Query Store wait statistics. See Hyperscale performance diagnostics for Hyperscale-specific waits. Any failover, scale or deployment events If you open a support case, include: The exact UTC time windows Sample error messages, with error numbers Connection IDs Your probe data Which application hosts or regions were affected With that information, we can start investigating straight away instead of spending the first day collecting it. Build for partial failure Retry transient errors with a retry limit, exponential backoff and jitter. (See our previous post on maintenance and failover.) Set sensible connection and command timeouts, so a slow login doesn't hold up a thread indefinitely. Alert on probe failures and login time, not just on platform availability. Know how to recover. For example, knowing when a failover is appropriate, and who can request it, saves time during an incident. Summary "Is the database online?" is often too simple a question. Ask instead: Can my application connect, how long does that take, and how fast are queries once connected? Measure those directly, at a fine enough granularity, and short partial outages stop being invisible.108Views0likes0CommentsHigh Latency, Normal CPU: Diagnosing PAGELATCH and Buffer Latch Contention in Azure SQL
A database can have spare CPU and still spend most of its time waiting. Your application is crawling. You open the Azure portal and CPU is moderate, storage I/O looks fine, worker usage is normal and there's plenty of space. Nothing on the Overview page looks wrong. So, what is the database actually waiting for? We recently worked through a case like this with an Azure SQL elastic pool. Latency was severe, but there was no sign of CPU, memory, worker, storage I/O, disk space or tempdb exhaustion. The evidence pointed somewhere less obvious: contention on in-memory pages under very high concurrency. This post explains how to recognize that pattern and what to do about it. Normal CPU doesn't mean a healthy database CPU shows how much work the database is doing. It doesn't show how long requests spend waiting to do that work. A request's elapsed time is roughly its CPU time plus its wait time. When wait time dominates, response times can get much worse while CPU stays flat or even drops. That's why wait statistics are the missing piece. They tell you what requests were waiting for, not just how busy the server was. PAGELATCH vs. PAGEIOLATCH These two wait types look alike but point to very different problems: Wait type What it means Typical cause PAGEIOLATCH_* Waiting for a page to be read from storage into memory I/O pressure, large scans, not enough memory PAGELATCH_* Waiting to access a page that is already in memory Many sessions competing for the same small set of pages A latch is a short, lightweight lock that protects a page while it's being read or changed. Usually, it's held for microseconds. When hundreds of sessions want the same page at the same moment, they line up, and those microseconds add up to seconds. In Query Store these waits are grouped under the Buffer Latch wait category, separate from Buffer IO (PAGEIOLATCH) and Latch (non-page latches such as LATCH_EX). Why concurrency multiplies the problem Latch contention doesn't grow in a straight line. Adding sessions that all compete for the same hot page doesn't add throughput. It adds queueing. Past a certain point, total throughput falls as concurrency rises, while CPU stays well below its limit. Common hot spots include: Last-page inserts: many sessions inserting into a table keyed on an ever-increasing value (IDENTITY, sequence, timestamp). Small, frequently updated tables: counters, status tables or queue tables. Metadata-heavy patterns at scale: for example, many application instances starting at once and each running schema or metadata discovery queries against the same system catalog pages. tempdb allocation or metadata pages under heavy temporary-object churn. A troubleshooting workflow Latency is high → CPU is normal → check waits → latch waits dominate → find the statements and pages → understand the workload pattern → reduce contention Step 1: Rule out resource exhaustion sys.dm_db_resource_stats keeps about the last hour of usage in 15-second intervals: SELECT TOP (40) end_time, avg_cpu_percent, avg_data_io_percent, avg_log_write_percent, avg_memory_usage_percent, max_worker_percent, max_session_percent FROM sys.dm_db_resource_stats ORDER BY end_time DESC; For elastic pools, also check sys.elastic_pool_resource_stats in the master database of the logical server. A healthy pool can still contain one database that is struggling. Step 2: Find out which waits dominate right now sys.dm_db_wait_stats is cumulative, so take two snapshots and compare them: SELECT wait_type, waiting_tasks_count, wait_time_ms INTO #w1 FROM sys.dm_db_wait_stats; WAITFOR DELAY '00:01:00'; -- sample during the slow period SELECT TOP (10) w2.wait_type, w2.waiting_tasks_count - w1.waiting_tasks_count AS waits, w2.wait_time_ms - w1.wait_time_ms AS wait_ms FROM sys.dm_db_wait_stats AS w2 JOIN #w1 AS w1 ON w1.wait_type = w2.wait_type WHERE w2.wait_time_ms - w1.wait_time_ms > 0 AND w2.wait_type NOT LIKE '%SLEEP%' AND w2.wait_type NOT LIKE 'XE%' AND w2.wait_type NOT IN ('WAITFOR', 'BROKER_TASK_STOP', 'SOS_WORK_DISPATCHER') ORDER BY wait_ms DESC; If PAGELATCH_EX or PAGELATCH_SH is at or near the top, keep going. Step 3: See who is waiting, and on which page SELECT r.session_id, r.wait_type, r.wait_time, r.wait_resource, s.program_name, s.host_name, pi.page_type_desc, OBJECT_NAME(pi.object_id, pi.database_id) AS object_name, pi.index_id, t.text AS sql_text FROM sys.dm_exec_requests AS r JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id OUTER APPLY sys.dm_exec_sql_text(r.sql_handle) AS t OUTER APPLY sys.fn_PageResCracker(r.page_resource) AS pc OUTER APPLY sys.dm_db_page_info(pc.db_id, pc.file_id, pc.page_id, 'DETAILED') AS pi WHERE r.wait_type LIKE 'PAGELATCH%'; Look for patterns: Many sessions on the same object and page: a classic hot page. The same statement repeated many times: a high-frequency pattern. Database ID 2: the contention is in tempdb. A system object: metadata contention. Step 4: Find the statements that accumulate the most waiting When elapsed time is far higher than CPU time, a statement is mostly waiting: SELECT TOP (10) qs.execution_count, qs.total_elapsed_time / 1000 AS total_elapsed_ms, qs.total_worker_time / 1000 AS total_cpu_ms, (qs.total_elapsed_time - qs.total_worker_time) / 1000 AS approx_wait_ms, SUBSTRING(st.text, qs.statement_start_offset / 2 + 1, (CASE qs.statement_end_offset WHEN -1 THEN DATALENGTH(st.text) ELSE qs.statement_end_offset END - qs.statement_start_offset) / 2 + 1) AS statement_text FROM sys.dm_exec_query_stats AS qs CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st ORDER BY approx_wait_ms DESC; To investigate after the fact, Query Store keeps waits for each query: SELECT TOP (10) q.query_id, qt.query_sql_text, SUM(ws.total_query_wait_time_ms) AS buffer_latch_wait_ms FROM sys.query_store_wait_stats AS ws JOIN sys.query_store_plan AS p ON p.plan_id = ws.plan_id JOIN sys.query_store_query AS q ON q.query_id = p.query_id JOIN sys.query_store_query_text AS qt ON qt.query_text_id = q.query_text_id WHERE ws.wait_category_desc = 'Buffer Latch' GROUP BY q.query_id, qt.query_sql_text ORDER BY buffer_latch_wait_ms DESC; Step 5: Build a timeline Put the following side by side by minute: Request rate and connection count Latch wait time CPU Application events such as deployments, restarts, scale-outs and batch jobs Contention that starts exactly when connections surge, and not when CPU climbs, tells you a lot. Why scaling can look like the fix In our case, latency recovered around the time the pool was scaled up. It's tempting to conclude that more vCores fixed it. That conclusion isn't proven. Scaling an Azure SQL database or pool does much more than add CPU: The workload usually moves to new compute. All connections are dropped and re-established. Memory and caches start fresh. Time passes, and the peak may simply end. Any of these can break a contention pattern, whatever the vCore count. To tell correlation from causation, compare latch waits at similar load before and after the change. If the same waits come back at the next peak on the larger size, capacity wasn't the root cause. Reducing contention Database side Last-page insert hot spots: consider OPTIMIZE_FOR_SEQUENTIAL_KEY = ON on the index, or a less sequential key design where appropriate. Small hot tables: spread or partition them, or reduce how often they're updated (batching, caching). tempdb churn: reduce heavy temporary-table creation in high-frequency code paths. Application side Limit concurrency. Size connection pools and worker counts on purpose. More parallel sessions isn't always faster. Cache metadata. Run schema or metadata discovery once, not on every connection or request. Avoid startup storms. Stagger instance startup, and use retry with exponential backoff and jitter. Batch small operations instead of sending thousands of tiny concurrent ones. Try it yourself: a concurrency lab CREATE TABLE dbo.HotInsert ( Id bigint IDENTITY(1,1) NOT NULL, Payload char(200) NOT NULL DEFAULT 'x', CreatedAt datetime2 NOT NULL DEFAULT SYSUTCDATETIME(), CONSTRAINT PK_HotInsert PRIMARY KEY CLUSTERED (Id) ); Run the same insert at three concurrency levels, for example with the RML Utilities ostress tool: ostress -S"<server>.database.windows.net" -U"<user>" -P"<password>" -d"<labdb>" ^ -Q"INSERT dbo.HotInsert DEFAULT VALUES;" -n1 -r20000 -q Repeat with -n16 and then -n200, adjusting -r so the total number of rows stays similar. For each run, record: Rows per second CPU from sys.dm_db_resource_stats The PAGELATCH_EX delta from the Step 2 query Then enable OPTIMIZE_FOR_SEQUENTIAL_KEY and run the test again: ALTER INDEX PK_HotInsert ON dbo.HotInsert SET (OPTIMIZE_FOR_SEQUENTIAL_KEY = ON); Watch how throughput levels off, or drops, as concurrency rises while CPU stays well below its limit. That's latch contention. Quick decision tree Is latency high but CPU, I/O, workers and memory normal? → Check waits. Is PAGEIOLATCH dominant? → Storage or memory pressure. Look at scans and indexing. Is PAGELATCH dominant? → In-memory contention. Find the hot pages and objects (Step 3). Is the hot page in a user table? → Insert pattern, key design or hot rows. Is it in tempdb or a system object? → Temporary-object churn or metadata-heavy patterns. Did it start with a connection surge? → Fix concurrency on the application side. Did scaling help? → Confirm at the next comparable peak before treating it as the fix. Key takeaway Not every Azure SQL performance problem needs more vCores. When latency is high and CPU is normal, look at what the database is waiting for, not just how busy it is. Latch contention is a concurrency problem, and it's usually solved by changing the workload pattern rather than buying more compute.107Views0likes0Comments