February 19, 2012

SQL Row Count and Table Size Script

Here is a handy little script I found that dumps out all the tables in a SQL DB, their sizes and how many records.  Handy for debugging why your DB has gotten so damn big. view sourceprint? CREATE TABLE #temp ( table_name sysname , row_count INT, reserved_size VARCHAR(50), data_size VARCHAR(50),… Read More