SQL Server Blocking Detection: Find Blocked Sessions
Mar 1, 2026 / · 5 min read · sql server blocking performance dm exec requests dm exec sessions wait types dba scripts monitoring query tuning ·Blocking in SQL Server occurs when one session holds a lock that another session needs, causing the second session to wait. This T-SQL script queries the dynamic management views to show all currently blocked sessions, the blocking session, wait type, wait duration, and the SQL text involved. Purpose and Overview When …
Read MoreGenerate SQL Server Space Usage Commands for All User Tables
Aug 7, 2025 / · 4 min read · sql server database administration t-sql space management database monitoring table analysis system tables database scripts sp_spaceused sys.tables sysobjects ·Generate SQL Server Space Usage Commands for All User Tables Managing database storage is a critical aspect of SQL Server administration. Understanding how much space each table consumes helps database administrators make informed decisions about maintenance, archiving, and performance optimization. This article …
Read MoreSQL Server Table Row Count Report: Complete T-SQL Script
SQL Server Database Table Row Count Report Script - Complete Guide Database administrators frequently need to monitor table sizes and row counts across their SQL Server databases. This comprehensive guide explores a powerful T-SQL script that generates detailed table row count reports using cursor-based iteration and …
Read More