Tag Archives: size taken by every table sql server

SQL Script to check storage utilized by every database object

Following Script will help us to find space utilized by every database object, this includes number of rows and size taken by every table. DECLARE @projected_size nvarchar(2) SET @projected_size = NULL declare @db_count bigint, @loop_count bigint, @sqlstat varchar(7000), @sqlstat2 varchar(7000), @sqlstat3 varchar(7000), @sqlstat4 varchar(7000), @sqlstat5 varchar(7000), @db_name varchar(150) CREATE TABLE #tablestats ( database_name varchar(150), table_name [...]