Spot Low-Memory Conditions with sys.dm_os_process_memory
sys.dm_os_process_memory is SQL Server's process-level counterpart to the operating system's own memory counters — a single row reporting exactly how much of the machine's memory space the sqlservr.exe process is holding, down to large-page allocations, committed virtual address space, and two flags that fire the …
Read MoreDecode PLE and Buffer Cache Hit Ratio via cntr_type Codes
Sep 6, 2026 / · 10 min read · sql server sys.dm_os_performance_counters page life expectancy buffer cache hit ratio cntr_type buffer manager sys.dm_os_sys_info sys.dm_exec_requests numa monitoring scripts ·How many seconds should a data page sit in the buffer pool before SQL Server decides it isn't needed anymore, and where does that number actually come from? Page life expectancy is one row among hundreds returned by sys.dm_os_performance_counters, and reading it correctly — along with its neighbor, buffer cache hit …
Read MoreAudit Server Configuration Drift with sys.configurations
Aug 24, 2026 / · 8 min read · sql server sys.configurations sp_configure reconfigure configuration drift advanced options xp_cmdshell security monitoring scripts ·Running sp_configure and getting back a success message is not the same thing as a setting actually taking effect. Between the moment a value is changed and the moment SQL Server is actually running it sits a gap — one a busy DBA can close with a single RECONFIGURE, or forget entirely until a restart months later flips …
Read MoreFind Ad Hoc Plan Cache Bloat with sys.dm_exec_cached_plans
Not every plan in SQL Server's cache earns its place. A query compiled once — because its literal values were hard-coded into the text instead of passed as parameters — gets a full compiled plan cached right alongside plans an application reuses thousands of times a day. sys.dm_exec_cached_plans is where that …
Read MoreAge Open Transactions with sys.dm_tran_active_transactions
A transaction that never commits keeps every log record written after it pinned in place, no matter how much work piles up behind it. sys.dm_tran_active_transactions lists every transaction currently open on the instance, but on its own it only shows a transaction ID and a start time — pairing it with …
Read MoreRank Expensive Queries with sys.query_store_runtime_stats
Query Store buckets runtime statistics into fixed time intervals, which means a query that ran steadily all week doesn't produce one row of history — it produces one row per interval, split further by execution outcome. Averaging those rows unweighted is how a "most expensive queries" report quietly gets the ranking …
Read MoreRank Top Memory Consumers with sys.dm_os_memory_clerks
Jul 20, 2026 / · 8 min read · sql server sys.dm_os_memory_clerks memory clerks memory pressure plan cache xtp query store dmv performance monitoring scripts ·Buffer pool counters explain data cache pressure but go silent the moment memory trouble comes from somewhere else. sys.dm_os_memory_clerks is the DMV that covers everything the buffer pool doesn't — plan cache, In-Memory OLTP, Query Store, query memory grants, Extended Events sessions — by reporting pages_kb per …
Read MoreBreak Down Buffer Pool Memory by Database
Jul 12, 2026 / · 8 min read · sql server sys.dm_os_buffer_descriptors buffer pool data cache memory database memory dmv performance monitoring scripts ·sys.dm_os_buffer_descriptors is the DMV that maps SQL Server's data cache down to the individual page level — one row per 8 KB page currently held in the buffer pool, tagged with the database_id and file_id it belongs to. Rolling those rows up with a simple GROUP BY database_id turns millions of individual page entries …
Read MoreMeasure Disk I/O Performance per Database File
Jul 3, 2026 / · 8 min read · sql server sys.dm_io_virtual_file_stats sys.master_files disk io io stall disk latency performance database files dmv monitoring scripts ·I/O latency is where disk bottlenecks hide. SQL Server accumulates every millisecond of file-level read and write wait in sys.dm_io_virtual_file_stats — one row per database file, reset at each service restart. Joining that DMV to sys.master_files replaces raw file IDs with physical paths and file types, and dividing …
Read MoreKnowing how much space each table and each index consumes is the foundation of capacity planning, archive policy, and index cleanup decisions on any SQL Server instance. This T-SQL script reads the partition-level storage statistics out of sys.dm_db_partition_stats and reports the size of every index — clustered, …
Read More