Welcome

Passionately curious about Data, Databases and Systems Complexity. Data is ubiquitous, the database universe is dichotomous (structured and unstructured), expanding and complex. Find my Database Research at SQLToolkit.co.uk

"The important thing is not to stop questioning. Curiosity has its own reason for existing" Einstein



Monday, 4 May 2009

list all table sizes

This is a useful script for collecting table sizes with the number of rows

Print 'All table sizes with the number of rows'
print 'Server Name...............: ' + convert(varchar(30),@@SERVERNAME)
PRINT 'Current Date Time.........: ' + convert(varchar(30),getdate(),113)

EXEC sp_MSforeachtable @command1="EXEC sp_spaceused '?'"

No comments:

Post a Comment

Note: only a member of this blog may post a comment.