Decode 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 MoreSQL Server DBCC Commands: The Complete DBA Reference Guide
Jun 8, 2026 / · 10 min read · sql server dbcc commands database maintenance database administration maintenance scripts sql scripts consistency checks dbcc checkdb dbcc shrinkfile plan cache sys.dm_exec_requests sys.dm_db_log_space_usage sys.dm_exec_cached_plans sys.dm_exec_input_buffer sys.dm_exec_sql_text ·An incident rarely announces which DBCC statement it needs. A log file stops truncating, a query slows after a plan changes, an identity column runs ahead of its table, and each one has a Database Console Command that answers it, sitting next to a few that can make the same situation worse. The DBCC statements are …
Read MoreSQL Server Long-Running Queries: Find Active Sessions
Find Active Long-Running Queries in SQL Server This script queries sys.dm_exec_requests and sys.dm_exec_sql_text to show all currently executing queries on the SQL Server instance, sorted by how long they have been running, along with CPU time, I/O activity, blocking status, and wait type information. Purpose and …
Read MoreBlocking happens when one session holds a lock that another session needs, so the second session waits. The query below lists every request that is waiting on another session right now: who is blocked, who is blocking, the wait type and wait time, the database, and the SQL text on both sides. Purpose and Overview The …
Read More