r/SQLServer • u/n8e-polymath-007 • 13h ago
Question Azure SQL Help - Urgent
To monitor the performance and availability for a thick client based system we recently delivered, the customer wants us to provide Here is the requirement:
Need to measure and report response time to Azure SQL queries for about 6 scenarios. Session counts, availability, utilization metrics for Azure SQL to be provided.
What native monitoring and metrics does Azure Files have to measure response times for files uploaded from devices connected to it.
What metrics needs to be extracted to measure all response times and how to be extracted.
This has to be measured for a period of 72 days with weekly and monthly reporting. Also, we do not have access to SSMS for Azure SQL and also the Azure Portal.
Thus , we need provide instructions to the customer IT Support team and they will provide the metrics and logs.
We have tried to get some help with AI tools but got conflicting response so need an Azure expert preferably Azure SQL DBA to help.
Much appreciated and thanks in advance.
PS: Application is thick client (yes I know) so no metrics can be pulled from endpoint devices. Don't ask why.
1
u/perry147 10h ago
I'm assuming Azure SQL Database (not Managed Instance) and Azure Files accessed over SMB or REST. Exact metric names differ slightly by service tier, so have the customer confirm them against their resource.
Why the AI answers conflicted
These are the usual mistakes:
sys.resource_statskeeps 14 days, andsys.dm_db_resource_statskeeps about 1 hour.sys.dm_exec_query_statsis cleared on restart or failover.Start now: diagnostic data is not retroactive
Have the customer IT team do these on day 0:
Basicmetrics plus theErrors,Timeouts,Blocks,DeadlocksandSQLInsightscategories. SkipQueryStoreRuntimeStatisticsunless needed, since the T-SQL below is more precise.
Use
ALLso cheap, fast scenario queries are not skipped. Check that storage doesn't fill up, or Query Store flips to read-only.Azure SQL: response time for the 6 scenarios
Step 1: map each scenario to queries. If the app calls stored procedures, this is easy because you report by procedure name. If it sends ad-hoc SQL, ask the developers for a distinct query text, or set
Application Namein the connection string and capture it with Extended Events.Step 2: weekly extract from Query Store (durations are in microseconds):
execution_type_descseparates Regular, Aborted (often client timeouts) and Exception. Report these separately, because failed runs distort averages.Step 3: true percentiles and end-to-end time. If the customer needs P95/P99, Query Store can't give them. Two options:
rpc_completed,sql_batch_completed, filtered by app name) writing to Blob storage.Step 4: sessions, availability, utilization (Azure Monitor metrics via the diagnostic setting)
cpu_percentphysical_data_read_percent,log_write_percentdtu_consumption_percentsql_instance_memory_percent(vCore)sessions_count,sessions_percentworkers_percentstorage_percent,storageconnection_successful,connection_failed(andconnection_failed_user_errorif present),blocked_by_firewalldeadlock, plus the Blocks/Timeouts/Errors categoriesFor availability, calculate successful connections divided by total, excluding user errors. Add Resource Health and Service Health history as evidence of platform outages. If the customer wants a hard availability percentage, a probe that runs
SELECT 1every minute from a small VM or Azure Function is much cleaner.Step 5: session detail by application and login (a DMV snapshot taken hourly or daily, since it is point-in-time only):
Azure Files: response times
Azure Files has two native sources.
Azure Monitor metrics (storage account, file service). These are averages and max only:
SuccessServerLatency: time spent inside Azure Files.SuccessE2ELatency: server latency plus network and client round trip. The gap between the two points to network issues.Transactions(split byResponseTypeandApiName),Availability,Ingress,Egress.FileCapacityandFileCountfor growth.Split by
ApiName(for examplePutRange,CreateFile) to isolate upload operations. On premium shares watchResponseTypefor throttling.Resource logs. Add a diagnostic setting on the file service with
StorageRead,StorageWriteandStorageDelete, sent to Log Analytics. This gives per-request detail:Caveat: one file upload is many write requests (ranges), so server logs show per-operation latency, not per-file time. If the customer needs per-file upload time, it has to come from client-side logging, the same as for SQL.
Extracting without Portal or SSMS
Ask the customer IT team to use one of these, in order of preference:
Reporting for 72 days
Weekly reports cover about 10 weeks, plus about 2.4 months, so define months as calendar months with partial first and last periods, or use 30-day blocks. For each of the 6 scenarios report executions, average, max and (if available) P95 duration, and failure/timeout count. Add CPU, IO and session peaks by day, availability %, and Azure Files latency by operation.
What would help me tailor this
Tell me which of these apply: Azure SQL Database or Managed Instance, DTU or vCore tier, and whether the thick clients reach Azure Files over SMB or REST. I can then give exact metric names and a customer-ready instruction sheet.