| Login

Search this Blog


Links I like to keep around


Here are the most recent postings to this blog. Use the archive calendar or search to find other entries.
Jan7

Written by:R Teachout
1/7/2008 6:27 PM 

EXEC sp_MSforeachtable "exec sp_spaceused '?'"

Just open query analyzer (or SSMS->query) and run the following against a database:

EXEC sp_MSforeachtable "exec sp_spaceused '?'"

This returns s list of tables, and the amount of usage they are using (rows + data usage)

name    rows      reserved     data         index_size  unused
<name>  17991232  12636448 KB  11051664 KB  1583816 KB  968 KB

Enjoy!

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment  Cancel 

Spending an evening on the World Wide Web is much like sitting down to a dinner of Cheetos, two hours later your fingers are yellow and you're no longer hungry, but you haven't been nourished.
-Clifford Stoll

Inspired by Nina