Microsoft SQL Server Monitoring
障害前にプラン回帰を見つける SQL Server 監視。
Obsfly は Query Store、DMV、AlwaysOn AG テレメトリを取り込み、シグネチャごとのレイテンシ、wait stats、予測アラートに変換、全インスタンスとレプリカで提供します。
Why monitor SQL Server
SQL Server gives you Query Store and DMVs for free. Most teams use Profiler or third-party tools for the visualization layer. Obsfly is that visualization layer — without the per-core licensing.
What we scrape
Obsfly reads SQL Server through the surfaces operators already know. No driver changes, no extensions installed by us, no agent on the database itself.
Query Store
Per-query_id runtime stats, plan history, regression detection (2016+).
sys.dm_exec_requests / sys.dm_exec_sessions
Live requests with wait_type and blocking_session_id.
sys.dm_exec_query_stats
Execution stats per cached plan.
sys.dm_os_wait_stats / dm_os_waiting_tasks
Wait-type aggregation.
sys.dm_db_index_usage_stats
Index usage and unused indexes.
sys.dm_hadr_database_replica_states
AlwaysOn AG lag and synchronization.
Key metrics tracked
Common SQL Server pains, and how Obsfly surfaces each
Plan regression after stats update
Sign
Query Store shows two plans, second one slower; regressed_query_id surfaces in the API.
Fix
Force the previous good plan via sp_query_store_force_plan. Investigate stat distribution.
tempdb contention (SOS_SCHEDULER_YIELD + PAGELATCH on tempdb)
Sign
Top waits dominated by PAGELATCH on tempdb pages.
Fix
Multiple tempdb files (one per logical core, up to 8). Trace flag 1118.
AlwaysOn async replica lag
Sign
log_send_queue_size growing; redo_queue_size stable.
Fix
Network bottleneck between primary and async replica. Verify endpoint encryption settings, NIC throughput.
vs Datadog DBM for SQL Server
Obsfly features for SQL Server
Feature
Query Summary
Top-N normalized queries with p50 / p95 / p99 latency, QPS, total time, rows touched, and plan-change history.
Feature
Explain Plan
Auto-captured EXPLAIN (ANALYZE, BUFFERS) plans on slow queries, plan diff over time, regression detection.
Feature
Anomaly Detection
ML-driven anomaly detection on every metric. Forecast bands, change-point detection, no thresholds to tune.
Feature
Deadlock Detection
Catch every deadlock with full lock-chain context, victim and aggressor stacks, and remediation suggestions.
FAQ
Editions supported?+
Standard, Enterprise, Web, Express. Azure SQL Database and Managed Instance. SQL Server 2016+ for full Query Store features; 2012/2014 work with reduced detail.
Does it require sysadmin?+
No. The VIEW SERVER STATE and VIEW DATABASE STATE permissions plus SELECT on Query Store views are enough.
Deep dives on SQL Server
Postgres
Postgres slow queries: 12 causes and how to find each one
A field-tested playbook for diagnosing a slow Postgres query in production — from missing indexes to plan flips to bloated tables — with the SQL to find each cause and the fix.
AI
Anomaly detection on database metrics: why thresholds fail and what works
A walk through forecast bands, change-point detection, multi-variate anomaly, and the seasonality math that makes 'p99 over 200ms' the wrong alert by default — with the Postgres example that broke our last threshold.