Grant VIEW SERVER STATE or SQL Server 2022 performance permissions to a monitoring login, add job history access, and test its limits.
Five DMVs Worth Memorizing
Five DMVs worth memorizing show SQL Server sessions, active requests, waits, index use, and file I/O during an incident.
Comparing Two Wait Stats Snapshots to See What Changed
Compare wait stats snapshots over a chosen window, subtract cumulative counters, remove background waits, and calculate rates and average waits.
Why One Query Has Two Cached Plans: SET Options and plan_attributes
Investigate two cached plans with plan_attributes, decode differing SET options, and match application settings before diagnosing skew.
Seeing What Is Running Right Now
See what is running right now in SQL Server with request DMVs, statement text, plans, waits, and blocking details in one reusable query.
SQL SERVER – 2008 – Find If Index is Being Used in Database
How do you find if an index is being used in your database? My quick script checks sys.dm_db_index_usage_stats, so you can drop unused indexes safely.
Finding the Client IP Address of a Connection
Find the client IP address of a SQL Server connection with DMVs and CONNECTIONPROPERTY, and understand proxy and local transport limits.







