Category Archives: SQL Server

SQL Server – How big are my tables?

Code Snippet create table #t (     name sysname primary key clustered,     rows bigint,     reserved sysname,     data sysname,     index_size sysname,     unused sysname ); exec sp_MSforeachtable 'insert into #t exec sp_spaceused ''?'''; select     name,     rows,     convert( bigint, replace( reserved, ' kb', '' … Continue reading

Posted in SQL Server | Tagged | Leave a comment