An Azure service that provides an event-driven serverless compute platform.
Hello Arpita Das,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your Azure metrics data for Connections metrics in Dedicated SQL Pool is unavailable while fetching through Function App.
To save time with best practices, follow the below steps to resolve the issue:
- Treat “Connections” as login attempts/min (not active users) for Synapse dedicated SQL pools it’s the count of total logins, so read it as a rate, not concurrency supported metrics; monitoring ref. Using this bash command:
az monitor metrics list --resource <sqlPoolResourceId> --metric Connections --interval PT1M - Measure real concurrency with DMVs query live sessions (for an example,
sys.dm_pdw_exec_sessions) instead of relying on the Connections metric DMV doc; DW DMV monitoring.SELECT COUNT(*) AS active_sessions FROM sys.dm_pdw_exec_sessions WHERE status='ACTIVE'; - Interpret spikes as connect/disconnect churn by using audit logs to chart login rate and check pooling/retry patterns SQL audit log format SQLSecurityAuditEvents; ADO.NET pooling.
AzureDiagnostics | where Category=="SQLSecurityAuditEvents" and action_name_s has "LOGIN" | summarize logins=count() by bin(TimeGenerated,1m) - Get failure reasons from platform logs for Azure SQL DB,
sys.event_logshows firewall/auth errors with messages and counts (sys.event_log).SELECT * FROM sys.event_log WHERE event_type='connection_failed' ORDER BY end_time DESC; - Correlate metrics + DMVs + logs in one view by use Metrics (trend), DMVs (live),
sys.event_log(failures), and Log Analytics audit events to stitch the picture using kusto Monitor Synapse; audit schema fields.AzureDiagnostics | where Category=="SQLSecurityAuditEvents" and action_name_s contains "AUTHENTICATION" - Enable auditing to Log Analytics (as this is mandatory for traceability) to send
SQLSecurityAuditEventsvia Diagnostic Settings so you can query all logins and failures centrally Auditing setup; Diagnostic settings. Using thios bash command:az monitor diagnostic-settings create --resource <dbId> --name sqlaudit --workspace <lawId> --logs '[{"category":"SQLSecurityAuditEvents","enabled":true}]' - Fix app behavior if spikes persist, turn on pooling and tame retries (keep connections short‑lived but reused; cap pool size) to avoid “retry storms” ADO.NET pooling knobs; TechCommunity guidance. In C#:
var cs="Server=tcp:...;Database=...;Pooling=true;Max Pool Size=200;"; using var c=new SqlConnection(cs); await c.OpenAsync();
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.