Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

To find the biggest tables in the SQL Server database I am using good stored procedure

EXEC dbo.sp_SOS @OrderBy='T' 

/*downloaded from
The related article "Find size of SQL Server tables and other objects with stored procedure"

Valid @OrderBy parameters are:

'N' --> Listing by object name

'R' --> Listing by number of records

'T' --> Listing by total size

'U' --> Listing by used portion (excluding free space)

'I' --> Listing by index size

'D' --> Listing by data size

'F' --> Listing by unused (free) space

'Y' --> Listing by object type


It's a start point before you will Archive Old data or consider to Partition table (see Sql Server 2005 - Twelve Tips For Optimizing Query Performance by Tony Wright)

 Alternatively(and simpler) use Stored procedure to identify the top n biggest tables in a database

Posted on Saturday, February 28, 2009 5:32 PM SQL Server | Back to top

Comments on this post: Stored procedure to find the biggest tables in the database

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: