
gladsheim.com
Ben’s PlaceEverybody needs a home. Listing database table sizes in SQL Server. July 7th, 2012. EXECUTE sp MSforeachtable @precommand = 'DROP TABLE # TableSizes; CREATE TABLE # TableSizes ( name NVARCHAR(128), rows CHAR(11), reserved VARCHAR(50), data VARCHAR(50), index size VARCHAR(50), unused VARCHAR(50) )', @command1 = 'INSERT INTO # TableSizes EXECUTE sp spaceused [? You now have a temporary table containing all the table size information and can easily query / sort / filter the information as you require, eg:.
http://www.gladsheim.com/
SOCIAL ENGAGEMENT